/* ═══════════════════════════════════════════════════════════════
   TalentMS — Design System
   ═══════════════════════════════════════════════════════════════ */
:root {
  --c-primary:   #4f46e5;
  --c-primary-d: #3730a3;
  --c-primary-l: #e0e7ff;
  --c-accent:    #06b6d4;
  --c-success:   #22c55e;
  --c-warning:   #f59e0b;
  --c-danger:    #ef4444;
  --c-text:      #0f172a;
  --c-text-2:    #475569;
  --c-border:    #e2e8f0;
  --c-bg:        #f8fafc;
  --c-surface:   #ffffff;
  --c-sidebar:   #1e1b4b;
  --c-sidebar-t: #c7d2fe;

  --radius:  10px;
  --radius-l: 16px;
  --shadow:  0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  --shadow-l: 0 8px 24px rgba(0,0,0,.12);

  --sidebar-w: 240px;
  --topbar-h:  60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Screens ── */
.screen { display: none; }
.screen.active { display: flex; }

/* ── Auth ── */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
}
.auth-brand {
  text-align: center;
  margin-bottom: 2rem;
  color: white;
}
.brand-icon {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 900;
  margin: 0 auto 1rem;
  color: white;
}
.auth-brand h1 { font-size: 2.4rem; font-weight: 800; color: white; }
.auth-brand h1 span { color: #a5b4fc; }
.auth-brand p { color: #c7d2fe; font-size: .95rem; margin-top: .25rem; }
.auth-card {
  background: white;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  padding: 2rem;
  width: 100%;
  max-width: 560px;
}
.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  background: var(--c-bg);
  border-radius: var(--radius);
  padding: 4px;
}
.tab-btn {
  flex: 1;
  padding: .5rem 1rem;
  border: none;
  background: transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 500;
  color: var(--c-text-2);
  transition: all .2s;
}
.tab-btn.active {
  background: white;
  color: var(--c-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.auth-form { display: none; }
.auth-form.active { display: block; }
.demo-hint {
  text-align: center;
  font-size: .8rem;
  color: var(--c-text-2);
  margin-top: .75rem;
}

/* ── App Layout ── */
#app-screen {
  flex-direction: row;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
#sidebar {
  width: var(--sidebar-w);
  background: var(--c-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .25s;
  overflow-y: auto;
}
#sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
}
.brand-icon-sm {
  width: 34px; height: 34px;
  background: var(--c-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  padding: .75rem 0;
  flex: 1;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  color: var(--c-sidebar-t);
  text-decoration: none;
  font-size: .9rem;
  border-radius: 8px;
  margin: 2px 8px;
  transition: all .15s;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: white; }
.nav-link.active { background: var(--c-primary); color: white; }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-divider {
  padding: 1rem 1rem .25rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(199,210,254,.5);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.user-avatar {
  width: 36px; height: 36px;
  background: var(--c-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; color: white;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { display: block; font-size: .85rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: .75rem; color: var(--c-sidebar-t); }
#logout-btn {
  background: none; border: none; cursor: pointer;
  color: var(--c-sidebar-t); font-size: 1.1rem; padding: 4px;
  transition: color .15s;
}
#logout-btn:hover { color: var(--c-danger); }

/* Main */
#main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin .25s;
}
#main-content.expanded { margin-left: 0; }

.top-bar {
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-bar h2 { font-size: 1.1rem; font-weight: 700; flex: 1; }

/* Pages */
.page { display: none; padding: 1.5rem; flex: 1; }
.page.active { display: block; }

/* ── Utility ── */
.hidden { display: none !important; }
.flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.ml-auto { margin-left: auto; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--c-text-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group + .form-group { margin-top: .75rem; }
input, select, textarea {
  width: 100%;
  padding: .55rem .8rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--c-text);
  background: white;
  transition: border-color .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }
textarea { resize: vertical; min-height: 80px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--c-primary); color: white; }
.btn-primary:hover { background: var(--c-primary-d); }
.btn-secondary { background: white; color: var(--c-text); border-color: var(--c-border); }
.btn-secondary:hover { background: var(--c-bg); }
.btn-danger { background: var(--c-danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; padding: .7rem; }
.icon-btn {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--c-text-2);
  transition: all .15s;
}
.icon-btn:hover { background: var(--c-bg); color: var(--c-text); }

/* ── Cards ── */
.card {
  background: white;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  border: 1px solid var(--c-border);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-title { font-size: 1rem; font-weight: 700; }

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* ── Status badges & Ampel ── */
.badge {
  background: var(--c-danger);
  color: white;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.status-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .78rem; font-weight: 600;
}
.status-green  { background: #dcfce7; color: #16a34a; }
.status-yellow { background: #fef9c3; color: #ca8a04; }
.status-red    { background: #fee2e2; color: #dc2626; }
.status-open   { background: #f1f5f9; color: var(--c-text-2); }
.status-done   { background: #dcfce7; color: #16a34a; }
.status-in_progress { background: #dbeafe; color: #1d4ed8; }
.status-overdue { background: #fee2e2; color: #dc2626; }
.status-draft   { background: #f3e8ff; color: #7e22ce; }
.status-active  { background: #dbeafe; color: #1d4ed8; }
.status-paused  { background: #fef3c7; color: #92400e; }
.status-completed { background: #dcfce7; color: #166534; }

/* ── Progress bar ── */
.progress-bar-wrap {
  background: var(--c-bg);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  transition: width .4s;
}

/* ── Stat Cards ── */
.stat-card {
  background: white;
  border-radius: var(--radius-l);
  padding: 1.25rem;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: .8rem; color: var(--c-text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--c-text); margin: .25rem 0; line-height: 1; }
.stat-card .stat-sub { font-size: .8rem; color: var(--c-text-2); }

/* ── Timeline / Roadmap ── */
.roadmap-container { overflow-x: auto; padding-bottom: 1rem; }
.roadmap-grid {
  display: grid;
  grid-template-rows: auto auto;
  min-width: max-content;
}
.month-headers { display: flex; border-bottom: 2px solid var(--c-border); }
.month-cell {
  min-width: 120px;
  padding: .5rem;
  text-align: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--c-text-2);
  border-right: 1px solid var(--c-border);
  background: var(--c-bg);
}
.month-cell.current-month {
  background: var(--c-primary-l);
  color: var(--c-primary);
}
.roadmap-rows { position: relative; }
.roadmap-row {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--c-border);
}
.roadmap-cell {
  min-width: 120px;
  height: 52px;
  border-right: 1px solid var(--c-border);
  position: relative;
}
.measure-bar {
  position: absolute;
  top: 10px; bottom: 10px;
  border-radius: 6px;
  display: flex; align-items: center;
  padding: 0 8px;
  font-size: .75rem; font-weight: 600;
  color: white;
  cursor: pointer;
  transition: opacity .15s;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  left: 4px; right: 4px;
}
.measure-bar:hover { opacity: .85; }
.bar-green  { background: var(--c-success); }
.bar-yellow { background: var(--c-warning); }
.bar-red    { background: var(--c-danger); }
.bar-open   { background: var(--c-primary); }

.milestone-marker {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  cursor: pointer;
  z-index: 2;
  transition: transform .15s;
  left: 50%; margin-left: -14px;
}
.milestone-marker:hover { transform: translateY(-50%) scale(1.2); }
.ms-review    { background: #e0e7ff; color: var(--c-primary); }
.ms-training  { background: #dcfce7; color: #16a34a; }
.ms-mentoring { background: #fef9c3; color: #ca8a04; }
.ms-exam      { background: #fee2e2; color: #dc2626; }
.ms-kickoff   { background: #f3e8ff; color: #7e22ce; }
.ms-closing   { background: #0f172a; color: white; }
.ms-overdue   { outline: 2px solid var(--c-danger); }

/* ── Competency Radar ── */
.radar-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.radar-chart-wrap {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  position: relative;
}
.radar-legend {
  flex: 1;
  min-width: 240px;
}
.competency-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  gap: .5rem;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid var(--c-border);
  font-size: .88rem;
}
.competency-row:last-child { border-bottom: none; }
.comp-name { font-weight: 500; }
.comp-level {
  text-align: center;
  padding: .2rem .4rem;
  border-radius: 6px;
  font-size: .8rem; font-weight: 700;
}
.level-current { background: #e0e7ff; color: var(--c-primary); }
.level-target  { background: #fef9c3; color: #ca8a04; }

/* ── Logbook ── */
.logbook-entry {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  padding: 1rem;
  margin-bottom: .75rem;
}
.logbook-entry-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .5rem;
}
.logbook-meta { font-size: .78rem; color: var(--c-text-2); }
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  background: var(--c-primary-l);
  color: var(--c-primary);
  border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  margin: .15rem .1rem;
}

/* ── Reviews ── */
.review-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
  background: white;
}
.review-rating-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  align-items: center;
  margin: .25rem 0;
  font-size: .88rem;
}
.star-rating { color: var(--c-warning); }

/* ── Template Library ── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.template-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  padding: 1.25rem;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.template-card:hover {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-l);
  transform: translateY(-2px);
}
.template-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
  display: block;
}
.template-name { font-weight: 700; margin-bottom: .3rem; }
.template-meta { font-size: .8rem; color: var(--c-text-2); }
.template-tags { margin-top: .5rem; }
.template-badge {
  position: absolute;
  top: .75rem; right: .75rem;
  background: var(--c-primary-l);
  color: var(--c-primary);
  font-size: .7rem; font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 999px;
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  backdrop-filter: blur(2px);
}
.modal {
  background: white;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  width: min(640px, 95vw);
  max-height: 90vh;
  display: flex; flex-direction: column;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }

/* ── Notifications ── */
.notif-dropdown {
  position: absolute;
  top: calc(var(--topbar-h) + 4px);
  right: 1.5rem;
  width: 340px;
  background: white;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  border: 1px solid var(--c-border);
  z-index: 60;
  overflow: hidden;
}
.notif-item {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background .15s;
}
.notif-item:hover { background: var(--c-bg); }
.notif-title { font-weight: 600; font-size: .88rem; }
.notif-body { font-size: .8rem; color: var(--c-text-2); margin-top: .15rem; }
.notif-empty { padding: 1.5rem; text-align: center; color: var(--c-text-2); font-size: .88rem; }

/* ── Error ── */
.error-msg {
  background: #fee2e2; color: #dc2626;
  padding: .6rem 1rem;
  border-radius: var(--radius);
  font-size: .85rem;
  margin-bottom: .75rem;
  border: 1px solid #fca5a5;
}

/* ── Empty states ── */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--c-text-2);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--c-text); margin-bottom: .5rem; }

/* ── Measure edit row (Drag & Drop) ── */
.measure-edit-list { border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.measure-edit-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto auto auto;
  gap: .5rem;
  align-items: center;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--c-border);
  background: white;
  font-size: .85rem;
}
.measure-edit-row:last-child { border-bottom: none; }
.drag-handle { cursor: grab; color: var(--c-text-2); font-size: 1rem; }
.drag-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: .4; }

/* ── Responsive ── */
@media (max-width: 768px) {
  #sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  #sidebar.mobile-open { transform: translateX(0); }
  #main-content { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .radar-container { flex-direction: column; }
  .modal { width: 95vw; }
}

/* ── Plan header ── */
.plan-hero {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  border-radius: var(--radius-l);
  padding: 1.5rem;
  color: white;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.plan-hero::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.plan-hero-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .25rem; }
.plan-hero-sub { opacity: .85; font-size: .9rem; margin-bottom: 1rem; }
.plan-hero-stats { display: flex; gap: 1.5rem; font-size: .85rem; flex-wrap: wrap; }
.plan-hero-stat strong { font-size: 1.5rem; font-weight: 800; display: block; }

/* ── Section headers ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 1.5rem 0 .75rem;
}
.section-title { font-size: 1rem; font-weight: 700; }

/* ── Team view ── */
.team-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  cursor: pointer;
  transition: all .2s;
}
.team-card:hover { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }
.team-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--c-primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0;
}
.team-card.selected { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }

/* ═══════════════════════════════════════════════════════════════
   Kanban Board
   ═══════════════════════════════════════════════════════════════ */
.board-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-height: 0;
}
.board-area { flex: 1; min-width: 0; }
.side-panel {
  width: 300px;
  flex-shrink: 0;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  overflow: hidden;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.side-panel-header {
  padding: .75rem 1rem;
  font-weight: 700;
  font-size: .9rem;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: .75rem;
  align-items: start;
}
.kanban-col {
  background: var(--c-bg);
  border-radius: var(--radius-l);
  border: 1px solid var(--c-border);
  min-height: 200px;
}
.kanban-col-header {
  padding: .65rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col-body {
  padding: .5rem;
  min-height: 120px;
}
.kanban-card {
  background: white;
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-border);
  border-radius: var(--radius);
  padding: .7rem .85rem;
  margin-bottom: .5rem;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.kanban-card:hover { box-shadow: var(--shadow); }
.kanban-card.col-open    { border-left-color: #94a3b8; }
.kanban-card.col-bearbeitung { border-left-color: var(--c-primary); }
.kanban-card.col-review  { border-left-color: var(--c-warning); }
.kanban-card.col-done    { border-left-color: var(--c-success); }
.kanban-card.card-overdue { border-left-color: var(--c-danger); box-shadow: 0 0 0 1px #fecaca; }
.kanban-card-title { font-size: .85rem; font-weight: 600; margin-bottom: .3rem; line-height: 1.3; }
.kanban-card-meta  { font-size: .72rem; color: var(--c-text-2); }

/* ── Platform badges ── */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .1rem .35rem;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--c-text-2);
  margin-left: .3rem;
}
.platform-linkedin { background: #e0f0f9; color: #0077b5; }
.platform-udemy    { background: #f3e8ff; color: #7c3aed; }
.platform-coursera { background: #e0eaff; color: #0056d2; }
.platform-youtube  { background: #fee2e2; color: #dc2626; }
.platform-internal { background: var(--c-primary-l); color: var(--c-primary); }

/* ── Catalog items ── */
.catalog-item {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background .12s;
}
.catalog-item:hover { background: var(--c-bg); }
.catalog-item:last-child { border-bottom: none; }
.catalog-item-title { font-size: .82rem; font-weight: 600; margin-bottom: .2rem; line-height: 1.3; }
.catalog-item-meta  { font-size: .72rem; color: var(--c-text-2); }

/* ── Status dot ── */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.dot-primary { background: var(--c-primary); }
.dot-danger  { background: var(--c-danger); }
.dot-success { background: var(--c-success); }
.dot-warning { background: var(--c-warning); }
.dot-muted   { background: #94a3b8; }

/* ── Legend bar-badge ── */
.bar-badge {
  display: inline-block;
  width: 14px; height: 10px;
  border-radius: 3px;
  margin-right: 3px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════
   Gantt / Meilensteine
   ═══════════════════════════════════════════════════════════════ */
.gantt-label-col {
  min-width: 160px;
  max-width: 160px;
  border-right: 1px solid var(--c-border);
  background: var(--c-surface);
}
.gantt-month-cell {
  min-width: 52px;
  max-width: 52px;
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--c-text-2);
  padding: .45rem .2rem;
  border-right: 1px solid var(--c-border);
}
.gantt-month-current { background: var(--c-primary-l); color: var(--c-primary); font-weight: 800; }
.gantt-cell {
  min-width: 52px;
  max-width: 52px;
  height: 32px;
  border-right: 1px solid var(--c-border);
  position: relative;
  overflow: visible;
}
.gantt-bar {
  position: absolute;
  inset: 4px 0;
  display: flex; align-items: center;
  cursor: pointer;
  transition: filter .15s;
}
.gantt-bar:hover { filter: brightness(.9); }
.gantt-bar-open        { background: #e2e8f0; }
.gantt-bar-in_progress { background: var(--c-primary); }
.gantt-bar-review      { background: var(--c-warning); }
.gantt-bar-done        { background: var(--c-success); }
.gantt-bar-overdue     { background: var(--c-danger); }
.gantt-bar-label { font-size: .62rem; color: white; padding: 0 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gantt-bar-open .gantt-bar-label { color: var(--c-text-2); }
.gantt-milestone {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
}
.gantt-ms-done  { opacity: .5; }
.gantt-ms-late  { filter: grayscale(.4) brightness(.85); }

/* ── Milestone timeline ── */
.milestone-timeline {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0;
  padding: .25rem 0 .5rem;
}
.ms-timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .4rem .5rem;
  border-radius: var(--radius);
  min-width: 80px;
  transition: background .15s;
}
.ms-timeline-item:hover { background: var(--c-bg); }
.ms-icon { font-size: 1.4rem; line-height: 1; }
.ms-label { text-align: center; }
.ms-connector {
  flex: 1;
  min-width: 24px;
  height: 2px;
  background: var(--c-border);
  margin-bottom: .9rem;
}
.ms-connector-done { background: var(--c-success); }
.ms-timeline-item.ms-done  .ms-icon { filter: none; }
.ms-timeline-item.ms-done  .ms-label { color: var(--c-success); }
.ms-timeline-item.ms-upcoming .ms-label { color: var(--c-text-2); opacity: .7; }
.ms-timeline-item.ms-current .ms-label { color: var(--c-primary); font-weight: 700; }
.ms-timeline-item.ms-overdue .ms-label { color: var(--c-danger); }

/* ═══════════════════════════════════════════════════════════════
   Heatmap (Team page)
   ═══════════════════════════════════════════════════════════════ */
.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.heatmap-table th {
  padding: .5rem .6rem;
  text-align: center;
  font-weight: 600;
  font-size: .72rem;
  color: var(--c-text-2);
  border-bottom: 2px solid var(--c-border);
  white-space: nowrap;
}
.heatmap-table th:first-child { text-align: left; }
.heatmap-table td {
  padding: .4rem .6rem;
  border-bottom: 1px solid var(--c-border);
  text-align: center;
}
.heatmap-table td:first-child { text-align: left; }
.heatmap-row:hover td { background: var(--c-bg); }
.heatmap-cell { font-weight: 700; border-radius: 4px; }
.heat-low  { background: #fecaca; color: #991b1b; }
.heat-mid  { background: #fde68a; color: #92400e; }
.heat-high { background: #bbf7d0; color: #14532d; }

/* ═══════════════════════════════════════════════════════════════
   Tab page buttons
   ═══════════════════════════════════════════════════════════════ */
.tab-bar {
  display: flex;
  gap: .35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.tab-page-btn {
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: white;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  color: var(--c-text-2);
}
.tab-page-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.tab-page-btn.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: white;
}

/* ── Radar layout ── */
.radar-container {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.radar-chart-wrap { flex: 1; max-width: 440px; }
.radar-legend { flex: 1; }
.competency-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .5rem;
  align-items: center;
  padding: .35rem 0;
}
.comp-name { font-size: .85rem; }
.comp-level {
  padding: .15rem .4rem;
  border-radius: 5px;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  min-width: 28px;
}
.comp-edit-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px 80px;
  gap: .5rem;
  align-items: center;
  padding: .4rem 0;
  border-bottom: 1px solid var(--c-border);
}

@media (max-width: 900px) {
  .board-layout { flex-direction: column; }
  .side-panel { width: 100%; max-height: 300px; }
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
  .radar-container { flex-direction: column; }
  .radar-chart-wrap { max-width: 100%; }
}
