/* ============================================================
   eConnect Sales Portaal — Stylesheet
   ============================================================ */

:root {
  --purple:       #6C3BAA;
  --purple-dark:  #52298A;
  --purple-light: #EDE8F5;
  --orange:       #F47820;
  --orange-light: #FFF3E8;
  --bg:           #F2F3F7;
  --white:        #FFFFFF;
  --gray-50:      #F9FAFB;
  --gray-100:     #F3F4F6;
  --gray-200:     #E5E7EB;
  --gray-300:     #D1D5DB;
  --gray-400:     #9CA3AF;
  --gray-500:     #6B7280;
  --gray-700:     #374151;
  --gray-900:     #111827;
  --green:        #10B981;
  --green-light:  #D1FAE5;
  --yellow:       #F59E0B;
  --yellow-light: #FEF3C7;
  --red:          #EF4444;
  --red-light:    #FEE2E2;
  --blue:         #3B82F6;
  --blue-light:   #DBEAFE;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 16px;
  --sidebar:   240px;
  --tr:        all 0.2s ease;
  --font:      'Inter', -apple-system, sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--gray-900); font-size: 14px; line-height: 1.5; }
a { cursor: pointer; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); font-size: 14px; }
input, select, textarea { font-family: var(--font); font-size: 14px; }

/* ---- UTILITY ---- */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.ml-auto { margin-left: auto; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--gray-400); }
.bold { font-weight: 600; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---- LOGO ---- */
.logo-e       { color: var(--orange); font-weight: 700; font-size: 18px; }
.logo-connect { color: var(--gray-900); font-weight: 700; font-size: 18px; }
.sidebar-logo-img { height: 28px; display: block; }
.login-logo-img   { height: 48px; display: block; margin: 0 auto 4px; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
#login-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, #1E1B3A 0%, #3D2175 50%, #1E1B3A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}
.shape-1 {
  width: 500px; height: 500px;
  background: var(--orange);
  top: -150px; right: -100px;
  animation: float 8s ease-in-out infinite;
}
.shape-2 {
  width: 350px; height: 350px;
  background: var(--purple-light);
  bottom: -100px; left: -80px;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-20px); }
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: slideUp 0.4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .logo-e, .login-logo .logo-connect { font-size: 28px; }
.login-title { font-size: 22px; font-weight: 700; text-align: center; color: var(--gray-900); }
.login-sub   { font-size: 13px; color: var(--gray-500); text-align: center; margin-top: 6px; margin-bottom: 28px; }

.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: var(--tr);
  margin-bottom: 12px;
}
.login-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-light); }

.login-error { color: var(--red); font-size: 13px; text-align: center; margin-top: 10px; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
#app {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
#sidebar {
  width: var(--sidebar);
  min-width: var(--sidebar);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-tag {
  background: var(--purple-light);
  color: var(--purple);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  padding: 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-600, #4B5563);
  font-weight: 500;
  font-size: 14px;
  transition: var(--tr);
  user-select: none;
}
.nav-item:hover { background: var(--gray-50); color: var(--gray-900); }
.nav-item.active {
  background: var(--purple-light);
  color: var(--purple);
  border-left: 3px solid var(--purple);
  margin-left: -1px;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.nav-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 8px 0;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--gray-100);
}
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  width: 100%;
  transition: var(--tr);
}
.btn-logout:hover { background: var(--red-light); color: var(--red); }

/* ---- MAIN ---- */
#main {
  margin-left: var(--sidebar);
  flex: 1;
  overflow-y: auto;
  min-height: 100vh;
}

.page {
  padding: 28px 32px;
  max-width: 1200px;
  animation: fadeIn 0.25s ease;
}
#page-prijsgenerator {
  padding: 0;
  max-width: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.page-header p   { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* Card */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card-sm { padding: 14px 16px; }

/* Buttons */
.btn-primary {
  background: var(--orange);
  color: var(--white);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: var(--tr);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover { background: #DC6A1A; }
.btn-full { width: 100%; justify-content: center; }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: var(--tr);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-ghost {
  color: var(--gray-500);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--tr);
  font-size: 13px;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-700); }

.btn-danger {
  color: var(--red);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--tr);
  font-size: 13px;
}
.btn-danger:hover { background: var(--red-light); }

.btn-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  transition: var(--tr);
}
.btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }
.btn-icon svg { width: 16px; height: 16px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.badge-purple  { background: var(--purple-light); color: var(--purple); }
.badge-orange  { background: var(--orange-light); color: var(--orange); }
.badge-green   { background: var(--green-light);  color: #065F46; }
.badge-yellow  { background: var(--yellow-light); color: #92400E; }
.badge-red     { background: var(--red-light);    color: #991B1B; }
.badge-gray    { background: var(--gray-100);     color: var(--gray-500); }
.badge-blue    { background: var(--blue-light);   color: #1E40AF; }

/* Status dot */
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-green  { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red    { background: var(--red); }
.dot-gray   { background: var(--gray-300); }

/* Avatar */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.avatar-sm  { width: 26px; height: 26px; font-size: 10px; }
.avatar-md  { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg  { width: 48px; height: 48px; font-size: 16px; }

/* Form elements */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--tr);
  background: var(--white);
  color: var(--gray-900);
}
.form-control:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-light); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  transition: var(--tr);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--purple-light);
}

/* ============================================================
   JAARDOEL BLOCK
   ============================================================ */
.annual-goal-block {
  background: linear-gradient(135deg, #1E1B3A 0%, #3D2175 60%, #6C3BAA 100%);
  border-radius: var(--radius);
  padding: 24px 28px;
  color: white;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(108,59,170,0.35);
  position: relative;
  overflow: hidden;
}
.annual-goal-block::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(244,120,32,0.12);
}
.annual-goal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.annual-goal-left { position: relative; }
.annual-goal-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 4px;
}
.annual-goal-amount {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
}
.annual-goal-of {
  font-size: 14px;
  opacity: 0.6;
  margin-top: 4px;
}
.annual-goal-right { text-align: right; }
.annual-goal-pct {
  font-size: 32px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}
.annual-goal-status {
  font-size: 13px;
  font-weight: 600;
  color: #4ADE80;
  margin-top: 2px;
}
.annual-goal-bar {
  height: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.annual-goal-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--orange), #FFB347);
  transition: width 1s ease;
}
.annual-goal-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.65;
}

/* ============================================================
   WEEK FOCUS BANNER
   ============================================================ */
.focus-banner {
  background: linear-gradient(135deg, var(--purple) 0%, #9B59B6 100%);
  border-radius: var(--radius);
  padding: 18px 24px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(108, 59, 170, 0.3);
}
.focus-label { font-size: 11px; font-weight: 600; opacity: 0.75; letter-spacing: 1px; text-transform: uppercase; }
.focus-text  { font-size: 16px; font-weight: 600; margin-top: 2px; }
.focus-driver {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}
.focus-driver-label { opacity: 0.75; }

.focus-edit {
  background: rgba(255,255,255,0.2);
  color: white;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  transition: var(--tr);
}
.focus-edit:hover { background: rgba(255,255,255,0.3); }

/* ============================================================
   WEEK STRIP (driver weeknotitie)
   ============================================================ */
.week-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.week-strip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--gray-400);
  white-space: nowrap;
}
.week-strip-note {
  font-size: 13px;
  color: var(--gray-700);
  flex: 1;
  font-style: italic;
}
.week-strip-note.empty { color: var(--gray-400); }

/* ============================================================
   KWARTAAL PIPELINE BREAKDOWN
   ============================================================ */
.quarter-pipeline {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 24px;
}
.quarter-pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.quarter-pipeline-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
}
.quarter-pipeline-meta {
  font-size: 12px;
  color: var(--gray-400);
}
.quarter-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.quarter-card {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1.5px solid var(--gray-200);
  transition: var(--tr);
}
.quarter-card:hover { border-color: var(--purple-light); }
.quarter-card.current { border-color: var(--purple); background: var(--purple-light); }
.quarter-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-bottom: 6px;
}
.quarter-card.current .quarter-card-label { color: var(--purple); }
.quarter-card-pipeline {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}
.quarter-card-target {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 3px;
}
.quarter-bar {
  height: 5px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.quarter-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--purple);
  transition: width 0.5s ease;
}
.quarter-card.current .quarter-bar-fill { background: var(--purple); }
.quarter-gap {
  font-size: 11px;
  color: var(--gray-500);
}
.quarter-gap strong { color: var(--orange); }
.quarter-deals-needed {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 3px;
}

/* ============================================================
   MARKETING PAGE
   ============================================================ */
.marketing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.marketing-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: var(--tr);
}
.marketing-card:hover { box-shadow: var(--shadow-md); }
.marketing-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.marketing-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}
.marketing-card-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}
.marketing-card-doel {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 8px;
  line-height: 1.4;
  padding: 8px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}
.marketing-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.marketing-leads {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

/* ============================================================
   STATS CARDS ROW
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}
.stat-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}
.stat-accent { color: var(--orange); }
.stat-green  { color: var(--green); }

/* Progress indicator in stat card */
.stat-progress {
  height: 3px;
  background: var(--gray-100);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.stat-progress-bar {
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ============================================================
   TEAM BOARD
   ============================================================ */
.team-section { margin-bottom: 24px; }
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 12px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.team-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--tr);
  cursor: default;
}
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.team-card-avatar { margin: 0 auto 8px; }
.team-card-name { font-size: 12px; font-weight: 600; color: var(--gray-900); }
.team-card-role { font-size: 11px; color: var(--gray-400); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-card-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--gray-500);
}
.team-status-available { color: var(--green); font-weight: 600; }
.team-status-busy      { color: var(--yellow); font-weight: 600; }
.team-status-full      { color: var(--red); font-weight: 600; }

/* ============================================================
   DASHBOARD BOTTOM ROW
   ============================================================ */
.dashboard-bottom { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.chart-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.chart-card h3 { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 16px; }
.chart-wrap { position: relative; height: 200px; }

.wins-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.wins-card h3 { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 12px; }
.win-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.win-item:last-child { border-bottom: none; }
.win-icon { font-size: 18px; }
.win-client { font-size: 13px; font-weight: 600; }
.win-owner  { font-size: 12px; color: var(--gray-400); }
.no-wins    { color: var(--gray-400); font-size: 13px; text-align: center; padding: 20px 0; }

/* ============================================================
   PIPELINE
   ============================================================ */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: visible;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  background: var(--gray-50);
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: var(--tr);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--gray-700);
  vertical-align: middle;
}

.stage-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.health-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pipeline-summary {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.pipeline-summary .stat {
  font-size: 13px;
  color: var(--gray-500);
}
.pipeline-summary .stat strong {
  font-weight: 700;
  color: var(--gray-900);
  display: block;
  font-size: 18px;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--tr);
}
.project-card:hover { box-shadow: var(--shadow-md); }

.project-card-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.project-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.project-card-title { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.project-card-goal  { font-size: 12px; color: var(--gray-500); margin-top: 4px; line-height: 1.4; }
.project-card-owners { display: flex; gap: 4px; margin-top: 12px; }

.project-progress { padding: 14px 18px 10px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
  font-weight: 500;
}
.progress-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  transition: width 0.5s ease;
}

.project-deliverables { padding: 0 18px 14px; }
.deliverables-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  padding: 8px 0;
  transition: var(--tr);
}
.deliverables-toggle:hover { color: var(--purple); }
.deliverables-list { display: none; padding-top: 4px; }
.deliverables-list.open { display: block; }

.deliverable-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: var(--tr);
}
.deliverable-item:hover { background: var(--gray-50); margin: 0 -4px; padding: 6px 4px; border-radius: 4px; }
.deliverable-item:last-child { border-bottom: none; }
.deliverable-check {
  width: 16px; height: 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--tr);
}
.deliverable-check.done {
  background: var(--green);
  border-color: var(--green);
}
.deliverable-check.done::after {
  content: '✓';
  color: white;
  font-size: 10px;
  font-weight: 700;
}
.deliverable-text { font-size: 12px; color: var(--gray-700); flex: 1; }
.deliverable-text.done { text-decoration: line-through; color: var(--gray-400); }

.project-card-footer {
  padding: 10px 18px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.project-notes {
  padding: 0 18px 14px;
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ============================================================
   ACTIONS
   ============================================================ */
.action-owner-pills { display: flex; gap: 4px; flex-wrap: wrap; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.admin-section { margin-bottom: 0; }
.admin-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}

.team-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.team-status-row:last-child { border-bottom: none; }

.weekly-stat-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.weekly-stat-row .form-control { padding: 6px 10px; font-size: 13px; }

/* ============================================================
   MODAL
   ============================================================ */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
  padding: 20px;
}
#modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  color: var(--gray-400);
  transition: var(--tr);
  padding: 4px;
  border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--gray-700); background: var(--gray-100); }
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gray-900);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  z-index: 2000;
  animation: slideUp 0.2s ease;
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   SIDE PANEL (persoon → deals doorklik)
   ============================================================ */
.sp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}
.side-panel {
  position: fixed;
  top: 0; right: 0;
  width: 400px;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  z-index: 201;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s ease;
  overflow: hidden;
}
@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.sp-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sp-avatar-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sp-name    { font-size: 16px; font-weight: 700; }
.sp-role    { font-size: 12px; color: var(--gray-400); margin-top: 1px; }
.sp-content { overflow-y: auto; flex: 1; padding: 16px 20px; }

.sp-section { margin-bottom: 20px; }
.sp-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--gray-400);
  margin-bottom: 10px;
}
.sp-deal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 8px;
}
.sp-deal-row:last-child { border-bottom: none; }
.sp-deal-client { font-size: 13px; font-weight: 600; }
.sp-deal-notes  { font-size: 11px; color: var(--gray-400); }
.sp-project-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.sp-project-row:last-child { border-bottom: none; }
.sp-action-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.sp-action-row:last-child { border-bottom: none; }
.sp-empty { font-size: 13px; color: var(--gray-400); padding: 8px 0; }

/* ============================================================
   NEXT MILESTONE BLOK
   ============================================================ */
.milestone-block {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.milestone-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.milestone-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
}
.milestone-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.milestone-col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.milestone-deal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.milestone-deal-row:last-child { border-bottom: none; }
.milestone-deal-client { font-weight: 600; }
.milestone-deal-owner  { font-size: 11px; color: var(--gray-400); }
.milestone-action-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.milestone-action-row:last-child { border-bottom: none; }
.milestone-deadline {
  font-size: 11px;
  color: var(--gray-400);
  white-space: nowrap;
  margin-top: 1px;
}
.milestone-deadline.urgent { color: var(--red); font-weight: 600; }

/* ============================================================
   PROJECT VERBETERINGEN
   ============================================================ */
.project-extra {
  padding: 0 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-field {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
}
.project-field-label {
  font-weight: 700;
  color: var(--gray-500);
  white-space: nowrap;
  min-width: 90px;
}
.project-field-value { color: var(--gray-700); line-height: 1.4; }
.project-field-value.blocker { color: var(--red); font-weight: 500; }
.project-field-value.next-step { color: var(--purple); font-weight: 500; }

.activity-log { padding: 0 18px 14px; }
.activity-log-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.activity-item {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--gray-100);
}
.activity-item:last-child { border-bottom: none; }
.activity-date { color: var(--gray-400); white-space: nowrap; min-width: 70px; }
.activity-text { color: var(--gray-700); }
.add-activity-btn {
  font-size: 12px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px 0;
  transition: var(--tr);
}
.add-activity-btn:hover { color: var(--purple); }

/* Project health border */
.project-card { border-left: 4px solid transparent; }
.project-health-green  { border-left-color: var(--green); }
.project-health-yellow { border-left-color: var(--yellow); }
.project-health-red    { border-left-color: var(--red); }

.health-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 16px;
  align-items: center;
}
.health-legend-item { display: flex; align-items: center; gap: 5px; }

/* Team card clickable */
.team-card { cursor: pointer; }

/* ============================================================
   SOFTWAREPAKKETTEN
   ============================================================ */
.sw-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sw-stat {
  flex: 1;
  min-width: 100px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.sw-stat-val   { font-size: 24px; font-weight: 700; color: var(--gray-900); }
.sw-stat-label { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

.sw-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.sw-search {
  flex: 2;
  min-width: 180px;
  padding: 8px 12px !important;
}
.sw-select {
  flex: 1;
  min-width: 130px;
  padding: 8px 10px !important;
  font-size: 13px !important;
}

.sw-table-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.sw-table th { font-size: 12px; }
.sw-naam       { font-weight: 600; font-size: 13px; }
.sw-leverancier{ font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.sw-website-link {
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.sw-website-link:hover { text-decoration: underline; }

.sw-status-click { cursor: pointer; transition: opacity 0.15s; }
.sw-status-click:hover { opacity: 0.8; }

.sw-contact-cell { font-size: 12px; color: var(--gray-700); max-width: 120px; }
.sw-notes-cell   { font-size: 12px; color: var(--gray-500); max-width: 180px; }

.sw-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 8px;
}
.sw-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid  { grid-template-columns: repeat(3, 1fr); }
  .dashboard-bottom { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .form-row   { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #sidebar { transform: translateX(-100%); }
  #main { margin-left: 0; }
  .page { padding: 16px; }
}
