/* ================================================================== */
/* KC-AIHR Portal — Shared Design System                              */
/* Extended from KC-AIPR base design tokens                           */
/* Fonts: Inter (EN), Noto Sans JP (JA) — Google Fonts                */
/* ================================================================== */

/* ----- CSS Custom Properties (Design Tokens) ----- */
:root {
  /* ---- Primary Colors (inherited from KC-AIPR) ---- */
  --color-primary-700: #0D2B52;
  --color-primary-600: #153D72;
  --color-primary-500: #1B4D8E;
  --color-primary-400: #2E6AB8;
  --color-primary-100: #E8F0FA;

  /* ---- Accent Colors (inherited from KC-AIPR) ---- */
  --color-accent-red: #C41E3A;
  --color-accent-green: #2E7D32;
  --color-accent-amber: #F59E0B;
  --color-accent-purple: #7C3AED;

  /* ---- Neutral Colors (inherited from KC-AIPR) ---- */
  --color-gray-900: #1A1A1A;
  --color-gray-700: #374151;
  --color-gray-600: #6B7280;
  --color-gray-400: #9CA3AF;
  --color-gray-200: #E5E7EB;
  --color-gray-100: #F3F4F6;
  --color-gray-50: #F9FAFB;
  --color-white: #FFFFFF;

  /* ---- Semantic Colors (inherited from KC-AIPR) ---- */
  --color-success: #2E7D32;
  --color-warning: #F59E0B;
  --color-error: #DC2626;
  --color-info: #1B4D8E;

  /* ---- HR-specific Accent Colors (NEW) ---- */
  --color-hr-teal: #0D9488;         /* Onboarding */
  --color-hr-teal-light: #CCFBF1;
  --color-hr-indigo: #4F46E5;       /* Recruitment branding */
  --color-hr-indigo-light: #E0E7FF;
  --color-hr-rose: #E11D48;         /* Engagement */
  --color-hr-rose-light: #FFE4E6;
  --color-hr-sky: #0284C7;          /* Mentoring */
  --color-hr-sky-light: #E0F2FE;

  /* ---- Shadows (inherited from KC-AIPR) ---- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* ---- Border Radius (inherited from KC-AIPR) ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ---- Spacing (inherited from KC-AIPR) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ---- Transitions (inherited from KC-AIPR) ---- */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* ---- Layout (inherited from KC-AIPR) ---- */
  --sidebar-width: 240px;
  --topbar-height: 56px;

  /* ---- Global Navigation (KC integration) ---- */
  --gnav-height: 52px;
}

/* ================================================================== */
/* Reset & Base (inherited from KC-AIPR)                               */
/* ================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-gray-900);
  background: var(--color-gray-50);
  display: flex;
  min-height: 100vh;
}

a {
  color: var(--color-primary-500);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-600);
}

ul {
  list-style: none;
}

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

/* ================================================================== */
/* KC Global Navigation (shared across KC-AIPR / KC-AIHR)             */
/* Inherited from KC-AIPR inject-nav pattern, formatted for reuse      */
/* ================================================================== */
.kc-gnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: var(--color-white);
  font-family: 'DM Sans', 'Noto Sans JP', system-ui, sans-serif;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.kc-gnav-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  height: var(--gnav-height);
  gap: var(--space-2);
}

.kc-gnav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-white);
  font-weight: 700;
  font-size: 15px;
  margin-right: var(--space-6);
  flex-shrink: 0;
}

.kc-gnav-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.kc-gnav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.kc-gnav-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.kc-gnav-links a:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
}

.kc-gnav-links a.active {
  color: var(--color-white);
  background: rgba(13, 148, 136, 0.35);
}

.kc-gnav-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 var(--space-2);
  flex-shrink: 0;
}

/* ================================================================== */
/* Sidebar (inherited from KC-AIPR)                                    */
/* ================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-primary-700);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

/* When global nav is present, offset sidebar below it */
.kc-gnav ~ .sidebar,
.kc-gnav ~ * .sidebar {
  top: var(--gnav-height);
  height: calc(100vh - var(--gnav-height));
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  min-height: var(--topbar-height);
}

.sidebar-close {
  display: none;
  color: var(--color-white);
  font-size: 24px;
  padding: var(--space-1);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-primary-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 11px;
  opacity: 0.6;
  line-height: 1.2;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: var(--space-3) 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.nav-link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active > .nav-link {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
  border-left-color: var(--color-accent-amber);
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-sublist {
  display: none;
  padding-left: calc(var(--space-4) + 24px + var(--space-3));
}

.nav-item.active .nav-sublist {
  display: block;
}

.nav-sublink {
  display: block;
  padding: var(--space-1) var(--space-3);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-fast);
}

.nav-sublink:hover {
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer-text {
  font-size: 11px;
  opacity: 0.4;
  text-align: center;
}

/* ================================================================== */
/* Main Wrapper (inherited from KC-AIPR)                               */
/* ================================================================== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* When global nav is present, account for its height */
.kc-gnav ~ .main-wrapper,
.kc-gnav ~ * .main-wrapper {
  padding-top: var(--gnav-height);
}

/* ================================================================== */
/* Top Bar (inherited from KC-AIPR)                                    */
/* ================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 var(--space-6);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
}

/* When global nav is present, offset sticky position */
.kc-gnav ~ .main-wrapper .topbar,
.kc-gnav ~ * .main-wrapper .topbar {
  top: var(--gnav-height);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-2);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-gray-700);
  border-radius: 1px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gray-700);
}

.phase-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-primary-500);
  background: var(--color-primary-100);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topbar-btn {
  position: relative;
  font-size: 18px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.topbar-btn:hover {
  background: var(--color-gray-100);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--color-accent-red);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary-500);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-700);
}

/* ================================================================== */
/* Content Area (inherited from KC-AIPR)                               */
/* ================================================================== */
.content {
  flex: 1;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 1280px;
  width: 100%;
}

/* ================================================================== */
/* Cards — shared (inherited from KC-AIPR)                             */
/* ================================================================== */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-gray-100);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-gray-700);
}

.card-date {
  font-size: 12px;
  color: var(--color-gray-400);
}

.card-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary-400);
}

.card-body {
  padding: var(--space-4) var(--space-5);
}

/* ================================================================== */
/* Row 1: Metric Cards (inherited from KC-AIPR)                        */
/* ================================================================== */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.metric-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
  display: flex;
  gap: var(--space-3);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.metric-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.metric-body {
  flex: 1;
  min-width: 0;
}

.metric-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray-600);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
}

.metric-unit {
  font-weight: 400;
  font-size: 12px;
  color: var(--color-gray-600);
}

.metric-bar {
  height: 4px;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  background: var(--color-primary-500);
  border-radius: var(--radius-full);
  transition: width 0.8s ease-out;
}

.metric-bar--warning {
  background: var(--color-accent-amber);
}

.metric-bar--accent {
  background: var(--color-accent-green);
}

.metric-bar--purple {
  background: var(--color-accent-purple);
}

/* ================================================================== */
/* Row 2: Two Column Layout (inherited from KC-AIPR)                   */
/* ================================================================== */
.two-col-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-4);
}

/* Schedule */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.schedule-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.schedule-item:hover {
  background: var(--color-gray-50);
}

.schedule-item--upcoming {
  opacity: 0.6;
}

.schedule-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary-500);
  min-width: 48px;
  flex-shrink: 0;
}

.schedule-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.schedule-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-900);
}

.schedule-meta {
  font-size: 12px;
  color: var(--color-gray-400);
}

.schedule-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-primary {
  background: var(--color-primary-100);
  color: var(--color-primary-500);
}

.badge-accent {
  background: #FEF3C7;
  color: #92400E;
}

.badge-neutral {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
}

/* AI Insights */
.ai-insights-card {
  border-top: 3px solid var(--color-accent-purple);
}

.ai-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-accent-purple);
  background: #F3EAFF;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

.insight-item {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-gray-50);
  margin-bottom: var(--space-3);
}

.insight-item:last-child {
  margin-bottom: 0;
}

.insight-item--urgent {
  background: #FEF2F2;
  border-left: 3px solid var(--color-error);
}

.insight-priority {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.insight-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-gray-700);
  margin-bottom: var(--space-2);
}

.insight-actions {
  display: flex;
  gap: var(--space-2);
}

/* ================================================================== */
/* Buttons (inherited from KC-AIPR)                                    */
/* ================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-sm {
  font-size: 12px;
  padding: var(--space-1) var(--space-3);
}

.btn-md {
  font-size: 14px;
  padding: var(--space-2) var(--space-4);
}

.btn-primary {
  background: var(--color-primary-500);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-600);
}

.btn-secondary {
  background: var(--color-primary-100);
  color: var(--color-primary-500);
}

.btn-secondary:hover {
  background: #D4E4F7;
}

.btn-ghost {
  background: transparent;
  color: var(--color-gray-600);
}

.btn-ghost:hover {
  background: var(--color-gray-100);
  color: var(--color-gray-900);
}

/* ================================================================== */
/* Row 3: Activity Feed (inherited from KC-AIPR)                       */
/* ================================================================== */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: 13px;
  border-bottom: 1px solid var(--color-gray-100);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.activity-dot--success {
  background: var(--color-success);
}

.activity-dot--info {
  background: var(--color-info);
}

.activity-dot--neutral {
  background: var(--color-gray-400);
}

.activity-dot--warning {
  background: var(--color-warning);
}

.activity-time {
  font-size: 12px;
  color: var(--color-gray-400);
  min-width: 88px;
  flex-shrink: 0;
}

.activity-agent {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent-purple);
  background: #F3EAFF;
  padding: 1px var(--space-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.activity-text {
  color: var(--color-gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================================== */
/* Row 4: Phase Progress (inherited from KC-AIPR)                      */
/* ================================================================== */
.phase-timeline {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.phase-step {
  flex: 1;
}

.phase-step-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-1);
}

.phase-step-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-400);
}

.phase-step--active .phase-step-label {
  color: var(--color-primary-500);
}

.phase-step-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-400);
}

.phase-step--active .phase-step-pct {
  color: var(--color-primary-500);
}

.phase-bar {
  height: 8px;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-1);
}

.phase-bar-fill {
  height: 100%;
  background: var(--color-primary-500);
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
}

.phase-step-name {
  font-size: 11px;
  color: var(--color-gray-400);
}

.phase-step--active .phase-step-name {
  color: var(--color-gray-600);
}

.phase-arrow {
  font-size: 18px;
  color: var(--color-gray-300);
  flex-shrink: 0;
  margin-top: -12px;
}

/* ================================================================== */
/* Footer (inherited from KC-AIPR)                                     */
/* ================================================================== */
.footer {
  padding: var(--space-4) var(--space-6);
  text-align: center;
  font-size: 12px;
  color: var(--color-gray-400);
  border-top: 1px solid var(--color-gray-200);
  background: var(--color-white);
}

/* ================================================================== */
/* Animations (inherited from KC-AIPR)                                 */
/* ================================================================== */
.card-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  transition-delay: calc(var(--delay, 0) * 80ms);
}

.card-animate--visible {
  opacity: 1;
  transform: translateY(0);
}


/* ================================================================== */
/* ================================================================== */
/*                                                                      */
/*   HR-SPECIFIC COMPONENTS (NEW — KC-AIHR extensions)                  */
/*                                                                      */
/* ================================================================== */
/* ================================================================== */


/* ================================================================== */
/* Candidate Pipeline Card                                             */
/* Displays individual candidate with avatar, info, and status         */
/* Usage: .candidate-card > .candidate-avatar + .candidate-info +      */
/*        .candidate-status                                            */
/* ================================================================== */
.candidate-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-200);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.candidate-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Circular avatar — shows initials or image */
.candidate-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary-100);
  color: var(--color-primary-600);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.candidate-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

/* Candidate name + position info */
.candidate-info {
  flex: 1;
  min-width: 0;
}

.candidate-info .candidate-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-info .candidate-position {
  font-size: 12px;
  color: var(--color-gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status pill badge (color set by .status-* classes) */
.candidate-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================================================================== */
/* Pipeline Board (Kanban-style)                                       */
/* Horizontal scrollable board with stage columns                      */
/* Usage: .pipeline-board > .pipeline-column*N                         */
/* ================================================================== */
.pipeline-board {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for pipeline board */
.pipeline-board::-webkit-scrollbar {
  height: 6px;
}

.pipeline-board::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
}

.pipeline-board::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: var(--radius-full);
}

/* Each stage column */
.pipeline-column {
  min-width: 260px;
  max-width: 320px;
  flex-shrink: 0;
  background: var(--color-gray-50);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

/* Column header with stage name + count bubble */
.pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--color-gray-200);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-700);
}

.pipeline-column-header .pipeline-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-gray-400);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Column color coding by recruitment stage */
.pipeline-column--applied .pipeline-column-header {
  border-bottom-color: var(--color-info);
}

.pipeline-column--applied .pipeline-count {
  background: var(--color-info);
}

.pipeline-column--screening .pipeline-column-header {
  border-bottom-color: var(--color-warning);
}

.pipeline-column--screening .pipeline-count {
  background: var(--color-warning);
}

.pipeline-column--interview .pipeline-column-header {
  border-bottom-color: var(--color-accent-purple);
}

.pipeline-column--interview .pipeline-count {
  background: var(--color-accent-purple);
}

.pipeline-column--offer .pipeline-column-header {
  border-bottom-color: var(--color-accent-green);
}

.pipeline-column--offer .pipeline-count {
  background: var(--color-accent-green);
}

.pipeline-column--joined .pipeline-column-header {
  border-bottom-color: var(--color-hr-teal);
}

.pipeline-column--joined .pipeline-count {
  background: var(--color-hr-teal);
}

/* Column body — holds candidate cards */
.pipeline-column-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  min-height: 120px;
}

/* ================================================================== */
/* HR Status Badges                                                    */
/* Color-coded status indicators for recruitment pipeline              */
/* Apply alongside .candidate-status or standalone                     */
/* ================================================================== */
.status-applied {
  background: var(--color-primary-100);
  color: var(--color-primary-600);
}

.status-screening {
  background: #FEF3C7;
  color: #92400E;
}

.status-interview {
  background: #F3EAFF;
  color: var(--color-accent-purple);
}

.status-offer {
  background: #DCFCE7;
  color: var(--color-accent-green);
}

.status-joined {
  background: var(--color-hr-teal-light);
  color: var(--color-hr-teal);
}

.status-onboarding {
  background: #FFF7ED;
  color: #C2410C;
}

/* ================================================================== */
/* Onboarding Timeline                                                 */
/* Vertical timeline with dots indicating completion status            */
/* Usage: .onboarding-timeline > .timeline-item*N                      */
/* ================================================================== */
.onboarding-timeline {
  position: relative;
  padding-left: var(--space-8);
}

/* Vertical line connecting all dots */
.onboarding-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--color-gray-200);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* Timeline dot — base style */
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-8) + 4px);
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--color-gray-200);
  border: 3px solid var(--color-white);
  box-shadow: 0 0 0 2px var(--color-gray-200);
  z-index: 1;
}

/* Timeline dot — completed (filled green) */
.timeline-dot--done {
  background: var(--color-success);
  box-shadow: 0 0 0 2px var(--color-success);
}

/* Timeline dot — in progress (animated teal pulse) */
.timeline-dot--active {
  background: var(--color-hr-teal);
  box-shadow: 0 0 0 2px var(--color-hr-teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px var(--color-hr-teal); }
  50% { box-shadow: 0 0 0 6px rgba(13, 148, 136, 0.2); }
}

/* Timeline dot — pending (gray, not started) */
.timeline-dot--pending {
  background: var(--color-gray-200);
  box-shadow: 0 0 0 2px var(--color-gray-200);
}

/* Timeline content — title + description */
.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-content .timeline-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-900);
}

.timeline-content .timeline-description {
  font-size: 13px;
  color: var(--color-gray-600);
  line-height: 1.5;
}

/* Date label for each timeline step */
.timeline-date {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-gray-400);
  margin-top: var(--space-1);
}

/* ================================================================== */
/* Skill Badge                                                         */
/* Technical skill tags (AWS, Azure, Python, React, etc.)              */
/* Usage: <span class="skill-badge skill-badge--python">Python         */
/*          <span class="skill-level skill-level--advanced"></span>     */
/*        </span>                                                      */
/* ================================================================== */
.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 12px;
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-hr-indigo-light);
  color: var(--color-hr-indigo);
  white-space: nowrap;
}

/* Technology-specific color variants */
.skill-badge--aws {
  background: #FFF7ED;
  color: #C2410C;
}

.skill-badge--azure {
  background: var(--color-hr-sky-light);
  color: var(--color-hr-sky);
}

.skill-badge--python {
  background: #FEF3C7;
  color: #92400E;
}

.skill-badge--react {
  background: #E0F2FE;
  color: #0369A1;
}

.skill-badge--go {
  background: #E0F2FE;
  color: #0284C7;
}

.skill-badge--java {
  background: var(--color-hr-rose-light);
  color: var(--color-hr-rose);
}

/* Skill level indicator — nested inside .skill-badge */
.skill-level {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
}

.skill-level--beginner {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
}

.skill-level--intermediate {
  background: #FEF3C7;
  color: #92400E;
}

.skill-level--advanced {
  background: #DCFCE7;
  color: var(--color-accent-green);
}

/* ================================================================== */
/* Progress Ring (SVG-based)                                           */
/* Circular progress indicator for completion percentages              */
/* Usage: .progress-ring > svg (with .progress-ring-bg + fg circles)   */
/*        + .progress-ring-value (center text)                         */
/* ================================================================== */
.progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease-out;
}

/* Background track circle */
.progress-ring .progress-ring-bg {
  stroke: var(--color-gray-100);
}

/* Foreground progress circle — default teal */
.progress-ring .progress-ring-fg {
  stroke: var(--color-hr-teal);
}

/* Color variants for progress ring */
.progress-ring--primary .progress-ring-fg {
  stroke: var(--color-primary-500);
}

.progress-ring--success .progress-ring-fg {
  stroke: var(--color-success);
}

.progress-ring--warning .progress-ring-fg {
  stroke: var(--color-warning);
}

.progress-ring--rose .progress-ring-fg {
  stroke: var(--color-hr-rose);
}

.progress-ring--indigo .progress-ring-fg {
  stroke: var(--color-hr-indigo);
}

/* Center value text overlay */
.progress-ring-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-gray-900);
  line-height: 1;
}

.progress-ring-value .progress-ring-unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray-600);
}

/* ================================================================== */
/* Checklist                                                           */
/* Task checklist with done / in-progress / pending states             */
/* Usage: .checklist > .checklist-item (.checklist-item--done |        */
/*         .checklist-item--current)                                   */
/* ================================================================== */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-gray-700);
  transition: background var(--transition-fast);
}

.checklist-item:hover {
  background: var(--color-gray-50);
}

/* Checkbox indicator via pseudo-element */
.checklist-item::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-gray-300);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

/* Done state — green filled checkbox with strike-through text */
.checklist-item--done {
  color: var(--color-gray-400);
  text-decoration: line-through;
}

.checklist-item--done::before {
  background: var(--color-success);
  border-color: var(--color-success);
  box-shadow: inset 3px -2px 0 0 var(--color-white);
}

/* Current / in-progress — highlighted with teal accent */
.checklist-item--current {
  background: var(--color-hr-teal-light);
  color: var(--color-gray-900);
  font-weight: 500;
}

.checklist-item--current::before {
  border-color: var(--color-hr-teal);
  background: rgba(13, 148, 136, 0.1);
}

/* ================================================================== */
/* Mentor Card                                                         */
/* Displays mentor/mentee pair information                             */
/* Usage: .mentor-card > .mentor-title + .mentor-pair                  */
/* ================================================================== */
.mentor-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--color-hr-sky);
  transition: box-shadow var(--transition-fast);
}

.mentor-card:hover {
  box-shadow: var(--shadow-md);
}

.mentor-card .mentor-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-hr-sky);
  margin-bottom: var(--space-3);
}

/* Mentor-mentee pair display — side by side with arrow */
.mentor-pair {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.mentor-pair .mentor-person {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

.mentor-pair .mentor-person .mentor-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

/* Mentor avatar — sky blue theme */
.mentor-pair .mentor-person--mentor .mentor-avatar {
  background: var(--color-hr-sky-light);
  color: var(--color-hr-sky);
}

/* Mentee avatar — teal theme */
.mentor-pair .mentor-person--mentee .mentor-avatar {
  background: var(--color-hr-teal-light);
  color: var(--color-hr-teal);
}

.mentor-pair .mentor-person .mentor-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mentor-pair .mentor-person .mentor-role {
  font-size: 12px;
  color: var(--color-gray-600);
}

.mentor-pair .mentor-arrow {
  font-size: 18px;
  color: var(--color-gray-300);
  flex-shrink: 0;
}

/* ================================================================== */
/* Engagement Score                                                     */
/* Gauge display with score, trend arrow, and label                    */
/* Usage: .engagement-gauge > .engagement-score + .engagement-trend    */
/* ================================================================== */
.engagement-gauge {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Large score number */
.engagement-score {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1;
}

.engagement-score .engagement-max {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-gray-400);
}

/* Trend indicator with CSS arrow */
.engagement-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 13px;
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

/* Trend up — green with upward triangle */
.engagement-trend--up {
  color: var(--color-accent-green);
  background: #DCFCE7;
}

.engagement-trend--up::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid var(--color-accent-green);
}

/* Trend down — rose with downward triangle */
.engagement-trend--down {
  color: var(--color-hr-rose);
  background: var(--color-hr-rose-light);
}

.engagement-trend--down::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--color-hr-rose);
}

/* Trend flat — neutral gray dash */
.engagement-trend--flat {
  color: var(--color-gray-600);
  background: var(--color-gray-100);
}

.engagement-trend--flat::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 2px;
  background: var(--color-gray-600);
}

.engagement-label {
  font-size: 12px;
  color: var(--color-gray-600);
  margin-top: var(--space-1);
}

/* ================================================================== */
/* Data Table                                                          */
/* Styled table for tabular HR data (candidates, evaluations, etc.)    */
/* Usage: table.data-table > thead + tbody                             */
/* ================================================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gray-600);
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--color-gray-200);
  white-space: nowrap;
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-gray-100);
  color: var(--color-gray-700);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--color-gray-50);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Striped variant for long tables */
.data-table--striped tr:nth-child(even) td {
  background: var(--color-gray-50);
}

.data-table--striped tr:nth-child(even):hover td {
  background: var(--color-gray-100);
}

/* ================================================================== */
/* Stat Card (Large number display)                                    */
/* Big numeric stat with label and optional trend                      */
/* Usage: .stat-card > .stat-value + .stat-label + .stat-trend         */
/* ================================================================== */
.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-6);
  text-align: center;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Large numeric value */
.stat-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-value .stat-unit {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-gray-600);
}

/* Descriptive label below value */
.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}

/* Period-over-period trend pill */
.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 12px;
  font-weight: 600;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
}

.stat-trend--positive {
  color: var(--color-accent-green);
  background: #DCFCE7;
}

.stat-trend--negative {
  color: var(--color-hr-rose);
  background: var(--color-hr-rose-light);
}

.stat-trend--neutral {
  color: var(--color-gray-600);
  background: var(--color-gray-100);
}

/* ================================================================== */
/* Tab Navigation                                                      */
/* Horizontal tabs with active underline and toggle panels             */
/* Usage: .tab-nav > .tab-item*N  +  .tab-panel*N                     */
/* ================================================================== */
.tab-nav {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 2px solid var(--color-gray-200);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-item {
  position: relative;
  padding: var(--space-3) var(--space-5);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-600);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  background: none;
  transition: color var(--transition-fast);
}

.tab-item:hover {
  color: var(--color-gray-900);
}

/* Active tab — primary underline */
.tab-item--active {
  color: var(--color-primary-500);
  font-weight: 600;
}

.tab-item--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary-500);
  border-radius: 2px 2px 0 0;
}

/* Tab panels — only show active */
.tab-panel {
  display: none;
  padding: var(--space-4) 0;
}

.tab-panel--active {
  display: block;
}


/* ================================================================== */
/* ================================================================== */
/*                                                                      */
/*   RESPONSIVE — Desktop (1280px+) / Tablet / Mobile                  */
/*                                                                      */
/* ================================================================== */
/* ================================================================== */

/* ----- Desktop (1280px+): default styles above ----- */

/* ----- Tablet (768px — 1024px) ----- */
@media (max-width: 1024px) {
  /* Metric cards: 2 per row */
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Two-column layout stacks vertically */
  .two-col-row {
    grid-template-columns: 1fr;
  }

  /* Phase timeline wraps */
  .phase-timeline {
    flex-wrap: wrap;
  }

  .phase-arrow {
    display: none;
  }

  .phase-step {
    min-width: calc(50% - var(--space-4));
  }

  /* Pipeline board: slightly narrower columns */
  .pipeline-column {
    min-width: 220px;
  }

  /* Stat card: slightly smaller numbers */
  .stat-value {
    font-size: 32px;
  }
}

/* ----- Mobile (768px and below) ----- */
@media (max-width: 768px) {
  /* Sidebar slides off-screen on mobile */
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar--open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-close {
    display: block;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
  }

  .topbar-title {
    font-size: 16px;
  }

  .phase-badge {
    display: none;
  }

  .user-name {
    display: none;
  }

  .content {
    padding: var(--space-4);
  }

  /* Metric cards: 1 per row */
  .metrics-row {
    grid-template-columns: 1fr;
  }

  /* Activity feed wraps */
  .activity-item {
    flex-wrap: wrap;
  }

  .activity-time {
    min-width: auto;
  }

  .phase-step {
    min-width: 100%;
  }

  /* Global nav: compact on mobile */
  .kc-gnav-inner {
    padding: 0 var(--space-3);
    height: 48px;
    overflow-x: auto;
  }

  .kc-gnav-links a {
    font-size: 12px;
    padding: 5px 10px;
  }

  /* Pipeline board: full-width scrollable columns */
  .pipeline-board {
    gap: var(--space-3);
  }

  .pipeline-column {
    min-width: 240px;
  }

  /* Candidate card: allow wrapping on small screens */
  .candidate-card {
    flex-wrap: wrap;
  }

  /* Stat card: compact sizing */
  .stat-value {
    font-size: 28px;
  }

  .stat-card {
    padding: var(--space-4);
  }

  /* Engagement gauge: stack vertically */
  .engagement-gauge {
    flex-direction: column;
    text-align: center;
  }

  /* Mentor pair: stack vertically with rotated arrow */
  .mentor-pair {
    flex-direction: column;
    gap: var(--space-3);
  }

  .mentor-pair .mentor-arrow {
    transform: rotate(90deg);
  }

  /* Tab nav: scrollable, slightly smaller */
  .tab-item {
    padding: var(--space-2) var(--space-4);
    font-size: 13px;
  }

  /* Data table: horizontal scroll on overflow */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
