/* =============================================
   MSP Resource Planner — ProUnity
   Design System & Styles
   ProUnity Brand: #800E5F (magenta), #0F2F37 (dark teal), #F3A9B4 (blush), #FFFBF4 (cream)
   ============================================= */

:root {
  /* ── ProUnity Brand ── */
  --brand:         #800E5F;   /* primary magenta */
  --brand-dark:    #5c0a45;   /* dark magenta */
  --brand-mid:     #a3297d;   /* medium magenta */
  --brand-light:   #f5e6f0;   /* very light magenta tint */
  --brand-soft:    #fce8f3;   /* soft blush bg */
  --brand-blush:   #F3A9B4;   /* brand blush/pink */
  --brand-cream:   #FFFBF4;   /* brand cream */
  --brand-navy:    #0F2F37;   /* dark teal navy */
  --brand-navy-mid:#1a4a57;   /* medium navy */
  --brand-navy-light:#e8f2f5; /* light navy tint */

  /* ── Functional (keep traffic-light colors intact) ── */
  --primary:       #800E5F;   /* mapped to brand */
  --primary-light: #f5e6f0;
  --primary-dark:  #5c0a45;
  --success:       #16a34a;
  --success-light: #dcfce7;
  --warning:       #d97706;
  --warning-light: #fef3c7;
  --danger:        #dc2626;
  --danger-light:  #fee2e2;
  --info:          #0F2F37;   /* mapped to brand navy */
  --info-light:    #e8f2f5;
  --purple:        #800E5F;   /* mapped to brand */
  --purple-light:  #f5e6f0;

  /* ── Seniority avatar colors ── */
  --senior-color:  #800E5F;   /* brand magenta — Senior */
  --medior-color:  #b8437a;   /* mid magenta — Medior */
  --junior-color:  #d4849f;   /* light magenta/blush — Junior */

  /* ── Layout & Neutrals ── */
  --bg:            #FFFBF4;   /* brand cream background */
  --bg-card:       #ffffff;
  --border:        #e8dde5;   /* tinted with brand */
  --border-light:  #f5eef3;
  --text:          #0F2F37;   /* brand navy for text */
  --text-2:        #4a6472;
  --text-3:        #8fa5ae;
  --sidebar-w:     240px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(128,14,95,.07), 0 1px 2px rgba(15,47,55,.05);
  --shadow-md:     0 4px 16px rgba(128,14,95,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--brand-navy) 0%, #0b2030 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--brand);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: white;
  line-height: 1.2;
}

.logo-sub {
  display: block;
  font-size: 11px;
  color: var(--brand-blush);
  opacity: .8;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(128,14,95,.25);
  color: white;
}

.nav-item.active {
  background: var(--brand);
  color: white;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.badge-count {
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: 700;
  margin-left: 4px;
}

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
}

.user-name { display: block; font-size: 12.5px; font-weight: 600; color: white; }
.user-role { display: block; font-size: 11px; color: #8fa5ae; }

/* ==================== MAIN CONTENT ==================== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  min-height: 100vh;
  overflow-y: auto;
}

.page { display: none; animation: fadeIn .2s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== PAGE HEADER ==================== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

/* Brand accent line under page title */
.page-title::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin-top: 6px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}

.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: white; color: var(--text-2); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-green { background: var(--success); color: white; padding: 4px 8px; }
.btn-red { background: var(--danger); color: white; padding: 4px 8px; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-soft { background: var(--danger-light); color: var(--danger); border: 1.5px solid #fca5a5; }
.btn-danger-soft:hover { background: #fee2e2; color: #b91c1c; }
.btn-xs { font-size: 11px; padding: 3px 7px; border-radius: 5px; border: none; cursor: pointer; font-weight: 700; }
.btn-amber { background: var(--warning); color: white; }
.btn-outline { background: transparent; border: 1.5px solid var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); }

/* ==================== CARDS ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  gap: 8px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i { font-size: 14px; }
.text-red { color: var(--danger); }
.text-amber { color: var(--warning); }
.text-blue { color: var(--brand); }
.text-green { color: var(--success); }

.card-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: .06em;
  padding: 0 20px;
}

/* ==================== KPI ROW ==================== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid transparent;
}

.kpi-green  { border-left-color: var(--success); }
.kpi-red    { border-left-color: var(--danger); }
.kpi-amber  { border-left-color: var(--warning); }
.kpi-blue   { border-left-color: var(--brand); }
.kpi-purple { border-left-color: var(--brand); }

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.kpi-green  .kpi-icon { background: var(--success-light); color: var(--success); }
.kpi-red    .kpi-icon { background: var(--danger-light);  color: var(--danger); }
.kpi-amber  .kpi-icon { background: var(--warning-light); color: var(--warning); }
.kpi-blue   .kpi-icon { background: var(--brand-light); color: var(--brand); }
.kpi-purple .kpi-icon { background: var(--brand-light); color: var(--brand); }

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.kpi-label {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 3px;
}

/* ==================== COVERAGE ROW ==================== */
.coverage-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.coverage-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid transparent;
}

/* Simplified functional colors only — Karen feedback: less decorative color */
.chip-green { background: var(--success-light); color: var(--success); border-color: #bbf7d0; }
.chip-amber { background: var(--warning-light); color: var(--warning); border-color: #fde68a; }
.chip-red { background: var(--danger-light); color: var(--danger); border-color: #fca5a5; }
.chip-blue { background: var(--brand-light); color: var(--brand); border-color: #d4a0c5; }
.chip-gray { background: #f0ecee; color: #4a6472; border-color: #ddd4d9; }
.chip-purple { background: var(--brand-light); color: var(--brand); border-color: #d4a0c5; }

/* ==================== TWO COL ==================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ==================== RISK LIST ==================== */
.risk-list { padding: 8px 0; }
.risk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background .12s;
}
.risk-item:last-child { border-bottom: none; }
.risk-item:hover { background: var(--bg); }

.risk-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.risk-dot.red { background: var(--danger); }
.risk-dot.amber { background: var(--warning); }
.risk-dot.green { background: var(--success); }

.risk-body { flex: 1; }
.risk-client { font-weight: 700; font-size: 13.5px; }
.risk-issue { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ==================== TAGS ==================== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tag-red { background: var(--danger); color: white; }
.tag-amber { background: var(--warning); color: white; }
.tag-green { background: var(--success); color: white; }
.tag-blue { background: var(--brand); color: white; }
.tag-gray { background: #e2e8f0; color: #475569; }
.tag-purple { background: var(--brand); color: white; }
.tag-purple-soft { background: var(--brand-light); color: var(--brand); }
.tag-red-soft { background: var(--danger-light); color: var(--danger); }
.tag-amber-soft { background: var(--warning-light); color: var(--warning); }
.tag-blue-soft { background: var(--brand-light); color: var(--brand); }
.tag-green-soft { background: var(--success-light); color: var(--success); }

/* ==================== ABSENCE LIST ==================== */
.absence-list { padding: 8px 0; }
.absence-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-light);
}
.absence-item:last-child { border-bottom: none; }
.absence-info { flex: 1; }
.absence-name { font-weight: 600; font-size: 13px; }
.absence-detail { font-size: 12px; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.absence-actions { display: flex; gap: 4px; }

/* ==================== OVERLAP ALERT ==================== */
.overlap-alert {
  border-left-color: var(--brand) !important;
  background: linear-gradient(to right, var(--brand-soft) 0%, #ffffff 60%);
}
.overlap-alert .alert-icon { background: var(--brand-light) !important; color: var(--brand) !important; }

/* ==================== PERSON AVATAR ==================== */
.person-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
}
.person-avatar.sm { width: 28px; height: 28px; font-size: 10px; }
/* ── Avatar palette — ProUnity brand tones ── */
.av-blue   { background: var(--brand-navy); }          /* dark teal */
.av-teal   { background: var(--brand-navy-mid); }      /* medium navy */
.av-green  { background: #16a34a; }                    /* keep green for availability */
.av-purple { background: var(--brand); }               /* brand magenta */
.av-orange { background: #c05c7e; }                    /* warm rose */
.av-red    { background: #dc2626; }                    /* keep red for alerts */
.av-pink   { background: var(--brand-blush); color: var(--brand-navy) !important; } /* brand blush */
.av-gray   { background: #5a7a85; }                    /* brand-toned gray */
.av-amber  { background: #b8437a; }                    /* mid magenta */
.av-indigo { background: var(--brand-dark); }          /* dark magenta */

/* ── Seniority-based avatar overrides ── */
.av-senior { background: var(--senior-color); }        /* #800E5F — full brand magenta */
.av-medior { background: var(--medior-color); }        /* #b8437a — lighter magenta */
.av-junior { background: var(--junior-color); }        /* #d4849f — blush */

/* ── PM avatar ── */
.av-pm     { background: var(--brand-navy); }

/* ==================== AVAILABILITY TABLE ==================== */
.table-scroll { overflow-x: auto; }
.availability-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.availability-table th {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.availability-table th:first-child { text-align: left; padding-left: 20px; }
.availability-table td {
  text-align: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
}
.availability-table td:first-child { text-align: left; padding-left: 20px; }
.availability-table tr:last-child td { border-bottom: none; }
.availability-table tr:hover td { background: var(--bg); }

.person-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
}

.avail-dot {
  font-size: 14px;
  font-weight: 700;
}
.avail-dot.green { color: var(--success); }
.avail-dot.red   { color: var(--danger); }
.avail-dot.amber { color: var(--warning); }
.avail-dot.blue  { color: var(--brand); }
.avail-dot.gray  { color: #94a3b8; }

.lang-tags { display: flex; gap: 3px; flex-wrap: wrap; }
.lang {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}
.lang.FR { background: #fee2e2; color: #991b1b; }
.lang.NL { background: #f5e6f0; color: #800E5F; }
.lang.EN { background: #dcfce7; color: #166534; }
.lang.DE { background: #fef3c7; color: #92400e; }

.role-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

/* ==================== PEAKS ==================== */
.peaks-list { padding: 8px 0; }
.peak-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  border-left: 3px solid transparent;
}
.peak-item:last-child { border-bottom: none; }
.peak-amber { border-left-color: var(--warning); background: #fffbeb; }
.peak-red   { border-left-color: var(--danger);  background: #fff5f5; }
.peak-blue  { border-left-color: var(--primary); background: #f0f7ff; }
.peak-gray  { border-left-color: #cbd5e1;        background: #f8fafc; opacity: 0.7; }
.peak-item { align-items: flex-start; }
.peak-date {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
}
.peak-msg { font-size: 13px; color: var(--text); }

/* ==================== TEAM GRID ==================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 0;
}

.team-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  cursor: pointer;
  transition: all .15s;
}
.team-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--brand);
}

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

.team-card-info { flex: 1; }
.team-card-name { font-weight: 700; font-size: 14px; }
.team-card-role { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.team-card-langs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.team-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.team-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-2);
}

.avail-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
}
.avail-badge.available { background: var(--success-light); color: var(--success); }
.avail-badge.absent { background: var(--danger-light); color: var(--danger); }
.avail-badge.partial { background: var(--warning-light); color: var(--warning); }

/* ==================== FILTER CHIPS ==================== */
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  font-family: inherit;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.chip-active { background: var(--brand); border-color: var(--brand); color: white; }

/* ==================== SEARCH INPUT ==================== */
.search-input {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  width: 260px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--brand); }

/* ==================== CLIENTS GRID ==================== */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.client-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  cursor: pointer;
  transition: all .15s;
}
.client-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.client-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.client-name { font-weight: 800; font-size: 16px; }
.client-sector { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.client-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}
.status-green { background: var(--success); }
.status-amber { background: var(--warning); }
.status-red { background: var(--danger); }
.status-blue { background: var(--brand); }
.status-gray { background: var(--text-3); }

.client-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.client-card-people {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.client-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-2);
}

/* ==================== CLIENT DETAIL ==================== */
.client-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 0;
}

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

.detail-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: .07em;
  margin-bottom: 10px;
}

.assignment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.assignment-row:last-child { border-bottom: none; }
.assignment-role { font-size: 12px; font-weight: 600; color: var(--text-2); min-width: 60px; }
.assignment-name { font-weight: 700; font-size: 13.5px; flex: 1; }
.assignment-status { font-size: 12px; }

.rule-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.rule-item:last-child { border-bottom: none; }
.rule-icon { font-size: 14px; width: 18px; text-align: center; }

.candidate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.candidate-row:hover { opacity: .85; }
.candidate-row:last-child { border-bottom: none; }
.candidate-rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  min-width: 20px;
}
.candidate-info { flex: 1; }
.candidate-name { font-weight: 700; font-size: 13px; }
.candidate-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.candidate-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  min-width: 50px;
  text-align: right;
}

/* ==================== PLANNING BOARD ==================== */
.planning-board {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.planning-board th {
  background: var(--bg);
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
}
.planning-board td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  vertical-align: middle;
}
.planning-board td:first-child {
  font-weight: 700;
  background: var(--bg);
  min-width: 160px;
}
.planning-board td:nth-child(2) {
  font-size: 12px;
  color: var(--text-2);
  min-width: 80px;
}

.plan-cell-ok { background: #f0fdf4; color: var(--success); font-weight: 600; font-size: 12px; text-align: center; }
.plan-cell-warn { background: #fffbeb; color: var(--warning); font-weight: 600; font-size: 12px; text-align: center; }
.plan-cell-err { background: #fef2f2; color: var(--danger); font-weight: 600; font-size: 12px; text-align: center; }
.plan-cell-leave { background: var(--brand-light); color: var(--brand); font-weight: 600; font-size: 12px; text-align: center; }
.plan-cell-na { background: #f8fafc; color: var(--text-3); font-size: 12px; text-align: center; }

/* ==================== ABSENCES FORM ==================== */
.absence-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.form-input, .form-select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: white;
  transition: border-color .15s;
}
.form-input:focus, .form-select:focus { border-color: var(--brand); }
.form-full { grid-column: span 2; }

.impact-preview {
  background: var(--warning-light);
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.impact-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--warning);
  margin-bottom: 8px;
}
.impact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 3px 0;
}

/* ==================== ALERTS PAGE ==================== */
.alerts-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.alert-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-left: 4px solid transparent;
  transition: all .15s;
}
.alert-card:hover { box-shadow: var(--shadow-md); }
/* Functional color indicators — Critical/Warning/Info only */
.alert-card.critical { border-left-color: var(--danger); }
.alert-card.warning { border-left-color: var(--warning); }
.alert-card.info { border-left-color: var(--brand-navy); }

.alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}
.alert-card.critical .alert-icon { background: var(--danger-light); color: var(--danger); }
.alert-card.warning .alert-icon { background: var(--warning-light); color: var(--warning); }
.alert-card.info .alert-icon { background: var(--brand-navy-light); color: var(--brand-navy); }

.alert-body { flex: 1; }
.alert-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.alert-msg { font-size: 12.5px; color: var(--text-2); }
.alert-meta { font-size: 11px; color: var(--text-3); margin-top: 6px; }

.alert-actions { display: flex; gap: 6px; align-items: flex-start; flex-shrink: 0; }

/* ==================== LONG TERM PLANNING ==================== */
.lt-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.lt-cell {
  background: white;
  padding: 8px;
  min-height: 60px;
  font-size: 11px;
}
.lt-cell-header {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg);
  padding: 8px;
  text-align: center;
}
.lt-cell-safe { background: #f0fdf4; }
.lt-cell-warn { background: #fffbeb; }
.lt-cell-risk { background: #fef2f2; }

/* ==================== PROFILE PAGE ==================== */
.profile-header {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.profile-meta { font-size: 13px; color: var(--text-2); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.profile-meta span { display: flex; align-items: center; gap: 4px; }

.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.lang-bar-row { margin-bottom: 12px; }
.lang-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}
.lang-bar-bg {
  background: var(--border);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}
.lang-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--brand);
  transition: width .4s ease;
}

.impact-warning {
  background: var(--danger-light);
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 16px;
}
.impact-warning-title { font-weight: 700; color: var(--danger); font-size: 12px; margin-bottom: 8px; }
.impact-item {
  font-size: 12.5px;
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

/* ==================== MODAL ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-2);
  padding: 4px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: var(--bg); }
.modal-body { padding: 20px 24px; }

/* ==================== LEGEND ==================== */
.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.green { background: var(--success); }
.legend-dot.amber { background: var(--warning); }
.legend-dot.red   { background: var(--danger); }
.legend-dot.blue  { background: var(--brand); }
.legend-dot.gray  { background: #cbd5e1; }

/* ==================== LT TABLE ==================== */
.lt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.lt-table th {
  background: var(--bg);
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.lt-table th:first-child { text-align: left; }
.lt-table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: center;
  font-weight: 600;
}
.lt-table td:first-child { text-align: left; font-weight: 700; }
.lt-cell-ok { background: #f0fdf4; color: var(--success); }
.lt-cell-warn2 { background: #fffbeb; color: var(--warning); }
.lt-cell-risk2 { background: #fef2f2; color: var(--danger); }
.lt-cell-na { background: #f8fafc; color: var(--text-3); }
.lt-cell-plan { background: var(--brand-light); color: var(--brand); }

/* ==================== UTILITY ==================== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.section-padding { padding: 16px 20px; }
.flex-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.muted { color: var(--text-2); font-size: 12px; }
.bold { font-weight: 700; }

/* ==================== WORKLOAD / VOLUME CHARTS ==================== */

/* Trend badges on team cards and client cards */
.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}
.trend-growing  { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.trend-declining { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.trend-stable   { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

/* Overloaded card highlight */
.card-overload {
  border-left: 3px solid var(--danger) !important;
  background: #fffafa !important;
}

/* Volume chart wrapper */
#dash-volume-card canvas {
  width: 100% !important;
}

/* Chart loading placeholder */
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-3);
  font-size: 13px;
  gap: 8px;
}

/* Vol trend badge on team cards */
.vol-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

/* ==================== DYNAMIC MODEL ADDITIONS ==================== */

/* Team card — edit button visible on hover */
.team-card { transition: box-shadow .15s, border-color .15s; position: relative; overflow: hidden; }
.team-card:hover { box-shadow: 0 4px 16px rgba(128,14,95,.12); border-color: #d4a0c5; }

/* Seniority stripe — thin left border on team cards */
.team-card[data-seniority="Senior"]  { border-left: 3px solid var(--senior-color); }
.team-card[data-seniority="Medior"]  { border-left: 3px solid var(--medior-color); }
.team-card[data-seniority="Junior"]  { border-left: 3px solid var(--junior-color); }

/* Client card — consistent with team card hover */
.client-card { transition: box-shadow .15s, border-color .15s; }
.client-card:hover { box-shadow: 0 4px 16px rgba(128,14,95,.12); border-color: #d4a0c5; }

/* Settings page param slider track */
input[type="range"] { accent-color: var(--brand); height: 4px; cursor: pointer; }

/* Dynamic badge on team/client card */
.dyn-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 99px; background: var(--brand-light); color: var(--brand);
}

/* Scenario preview section */
#sc-preview { animation: fadeIn .2s ease; }

/* Changelog rows */
#changelog-body { max-height: 320px; overflow-y: auto; }

/* Settings roadmap items */
.roadmap-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f8fafc; }

/* Modal wider for complex forms */
.modal { width: min(640px, 94vw) !important; }

/* KPI row — 5 columns */
.kpi-row { grid-template-columns: repeat(5, 1fr); }

/* BU2 missing badge on client card */
.tag-bu2-missing { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1300px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .client-detail-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 60px; }
  .sidebar-logo .logo-text { display: none; }
  .nav-item span { display: none; }
  .nav-item { justify-content: center; }
  .main-content { padding: 16px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .search-input { width: 180px; }
}
