/* ============================================
   Portale del Candidato — Design System
   ============================================ */

/* ─── Fonts ─── */
@font-face {
  font-family: 'Bomstad Display';
  src: url('../../Assets/fonts/Bomstad Display/BomstadDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bomstad Display';
  src: url('../../Assets/fonts/Bomstad Display/BomstadDisplay-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bomstad Display';
  src: url('../../Assets/fonts/Bomstad Display/BomstadDisplay-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bomstad Display';
  src: url('../../Assets/fonts/Bomstad Display/BomstadDisplay-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bomstad Display';
  src: url('../../Assets/fonts/Bomstad Display/BomstadDisplay-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ─── Custom Properties ─── */
:root {
  /* Brand Colors */
  --pdc-blue-50: #eff6ff;
  --pdc-blue-100: #dbeafe;
  --pdc-blue-200: #bfdbfe;
  --pdc-blue-300: #93c5fd;
  --pdc-blue-400: #60a5fa;
  --pdc-blue-500: #3b82f6;
  --pdc-blue-600: #2563eb;
  --pdc-blue-700: #1d4ed8;
  --pdc-blue-800: #1e3a5f;
  --pdc-blue-900: #0f2440;
  --pdc-blue-950: #0a1628;

  /* Accent */
  --pdc-accent: #f59e0b;
  --pdc-accent-light: #fbbf24;
  --pdc-accent-dark: #d97706;

  /* Success / Warning / Error */
  --pdc-success: #10b981;
  --pdc-success-light: #d1fae5;
  --pdc-warning: #f59e0b;
  --pdc-warning-light: #fef3c7;
  --pdc-error: #ef4444;
  --pdc-error-light: #fee2e2;
  --pdc-info: #3b82f6;
  --pdc-info-light: #dbeafe;

  /* Neutrals */
  --pdc-gray-50: #f8fafc;
  --pdc-gray-100: #f1f5f9;
  --pdc-gray-200: #e2e8f0;
  --pdc-gray-300: #cbd5e1;
  --pdc-gray-400: #94a3b8;
  --pdc-gray-500: #64748b;
  --pdc-gray-600: #475569;
  --pdc-gray-700: #334155;
  --pdc-gray-800: #1e293b;
  --pdc-gray-900: #0f172a;

  /* Surfaces */
  --surface-bg: #f1f5f9;
  --surface-card: rgba(255,255,255,0.82);
  --surface-card-solid: #ffffff;
  --surface-card-hover: rgba(255,255,255,0.95);
  --surface-sidebar: var(--pdc-blue-950);
  --surface-sidebar-hover: rgba(255,255,255,0.06);
  --surface-overlay: rgba(15, 23, 42, 0.35);

  /* Typography */
  --font-display: 'Bomstad Display', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows — realistic multi-layer */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.03), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-md: 0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 1px 3px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 2px 4px rgba(0,0,0,0.02), 0 12px 40px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 20px rgba(59,130,246,0.15);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.02), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 2px 4px rgba(0,0,0,0.03), 0 12px 32px rgba(0,0,0,0.08);

  /* Transitions — spring easing */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--pdc-gray-800);
  background: var(--surface-bg);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--pdc-blue-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--pdc-blue-700); }

img { max-width: 100%; height: auto; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ─── Typography ─── */
.heading-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--pdc-gray-900);
  letter-spacing: -0.01em;
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-muted { color: var(--pdc-gray-500); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 200ms var(--ease-out-expo);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}
.btn:active { transform: scale(0.97); transition-duration: 80ms; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface-bg), 0 0 0 4px var(--pdc-blue-400);
}

.btn-primary {
  background: linear-gradient(135deg, var(--pdc-blue-600), var(--pdc-blue-700));
  color: #fff;
  box-shadow: 0 1px 2px rgba(37,99,235,0.2), 0 4px 12px rgba(37,99,235,0.15);
}
.btn-primary:hover {
  box-shadow: 0 2px 4px rgba(37,99,235,0.25), 0 8px 20px rgba(37,99,235,0.2);
  transform: translateY(-1px) scale(1.02);
}

.btn-secondary {
  background: var(--surface-card-solid);
  color: var(--pdc-gray-700);
  border: 1px solid var(--pdc-gray-200);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--pdc-gray-50);
  border-color: var(--pdc-gray-300);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

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

.btn-danger {
  background: var(--pdc-error);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--pdc-success);
  color: #fff;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.9375rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ─── Inputs ─── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group:focus-within .form-label {
  color: var(--pdc-blue-600);
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pdc-gray-600);
  transition: color var(--transition-fast);
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--pdc-gray-200);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  color: var(--pdc-gray-800);
  background: var(--surface-card-solid);
  transition: all 200ms var(--ease-out-expo);
  outline: none;
}
.form-input::placeholder { color: var(--pdc-gray-400); }
.form-input:focus {
  border-color: var(--pdc-blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-input:hover:not(:focus) {
  border-color: var(--pdc-gray-300);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--pdc-error);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Cards ─── */
.card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow-card);
  transition: all 300ms var(--ease-out-expo);
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(0,0,0,0.06);
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--pdc-gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--pdc-gray-100);
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.badge-blue { background: var(--pdc-blue-100); color: var(--pdc-blue-700); }
.badge-green { background: var(--pdc-success-light); color: #065f46; }
.badge-yellow { background: var(--pdc-warning-light); color: #92400e; }
.badge-red { background: var(--pdc-error-light); color: #991b1b; }
.badge-gray { background: var(--pdc-gray-100); color: var(--pdc-gray-600); }

/* ─── Stat Cards ─── */
.stat-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 300ms var(--ease-out-expo);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(0,0,0,0.06);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; stroke-width: 1.75; }
.stat-icon.blue { background: linear-gradient(135deg, var(--pdc-blue-100), var(--pdc-blue-50)); color: var(--pdc-blue-600); }
.stat-icon.green { background: linear-gradient(135deg, var(--pdc-success-light), #ecfdf5); color: var(--pdc-success); }
.stat-icon.yellow { background: linear-gradient(135deg, var(--pdc-warning-light), #fffbeb); color: var(--pdc-accent-dark); }
.stat-icon.red { background: linear-gradient(135deg, var(--pdc-error-light), #fef2f2); color: var(--pdc-error); }

.stat-content { flex: 1; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--pdc-gray-900);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--pdc-gray-500);
  margin-top: 4px;
}
.stat-change {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.stat-change.up { color: #065f46; background: var(--pdc-success-light); }
.stat-change.down { color: #991b1b; background: var(--pdc-error-light); }

/* ─── Avatar ─── */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow-sm);
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }
.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--pdc-blue-500), var(--pdc-blue-700));
}

/* ─── Tables ─── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--pdc-gray-100);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pdc-gray-500);
  background: var(--pdc-gray-50);
  text-align: left;
  border-bottom: 1px solid var(--pdc-gray-200);
}
.data-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--pdc-gray-100);
  vertical-align: middle;
}
.data-table tbody tr {
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover {
  background: var(--pdc-blue-50);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ─── Progress ─── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--pdc-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--pdc-blue-500), var(--pdc-blue-600));
  transition: width var(--transition-slow);
}

/* ─── Empty State ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--pdc-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--pdc-gray-400);
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 1.125rem;
  color: var(--pdc-gray-700);
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--pdc-gray-500);
  font-size: 0.875rem;
  max-width: 360px;
}

/* ─── Toasts ─── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--pdc-blue-500);
  animation: toastSlideIn 0.3s var(--transition-spring) forwards;
  min-width: 320px;
  max-width: 460px;
}
.toast.success { border-left-color: var(--pdc-success); }
.toast.error { border-left-color: var(--pdc-error); }
.toast.warning { border-left-color: var(--pdc-warning); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ─── Skeleton Loading ─── */
.skeleton {
  background: linear-gradient(90deg, var(--pdc-gray-100) 25%, var(--pdc-gray-200) 50%, var(--pdc-gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Utilities ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: 4px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.gap-xl { gap: 32px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--pdc-gray-300);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--pdc-gray-400); }

/* ─── Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fadeIn 0.4s ease forwards; }
.animate-slide-up { animation: slideUp 0.5s ease forwards; }
.animate-scale-in { animation: scaleIn 0.3s ease forwards; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(7) { animation-delay: 360ms; }
.stagger > *:nth-child(8) { animation-delay: 420ms; }

/* --- Sidebar --- */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0c1929 0%, #0a1628 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.03);
}
.sidebar-header {
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-logo { 
  height: auto; 
  width: 100%; 
  max-width: 150px; 
  object-fit: contain;
  opacity: 0.9;
}

.sidebar-nav { 
  flex: 1; 
  padding: 16px 12px; 
  display: flex; 
  flex-direction: column; 
  gap: 2px; 
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-item {
  display: flex; 
  align-items: center; 
  gap: 12px;
  padding: 10px 14px; 
  border-radius: var(--radius-md);
  color: rgba(148,163,184,0.8); 
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer; 
  transition: all 200ms var(--ease-out-expo); 
  text-decoration: none; 
  border: none; 
  background: none; 
  width: 100%; 
  text-align: left;
  position: relative;
  letter-spacing: 0.01em;
}
.nav-item:hover { 
  background: rgba(255,255,255,0.04); 
  color: rgba(226,232,240,0.9); 
}
.nav-item.active { 
  background: rgba(59,130,246,0.1); 
  color: #ffffff;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--pdc-blue-500);
  border-radius: 0 3px 3px 0;
}

.nav-icon { 
  width: 20px; 
  height: 20px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  flex-shrink: 0;
}
.nav-icon svg { width: 20px; height: 20px; stroke-width: 1.75; }
.nav-icon img { width: 20px; height: 20px; object-fit: contain; }

.sidebar-footer {
  padding: 16px 12px; 
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; 
  flex-direction: column; 
  gap: 2px;
}

/* --- Top Bar --- */
.top-bar {
  height: 64px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-bar-left h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pdc-gray-900);
  margin: 0;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Header Icons */
.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--pdc-gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms var(--ease-out-expo);
  position: relative;
}
.header-icon-btn:hover {
  background: var(--pdc-gray-100);
  color: var(--pdc-gray-700);
}
.header-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}
.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--pdc-error);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
}

/* User Dropdown */
.user-dropdown-container {
  position: relative;
  display: inline-block;
  margin-left: 12px;
  padding-left: 16px;
  border-left: 1px solid var(--pdc-gray-100);
}
.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-full);
  transition: all 200ms var(--ease-out-expo);
}
.user-profile-btn:hover {
  background: var(--pdc-gray-50);
}
.user-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pdc-blue-100);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.1);
}
.user-profile-info {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 4px;
}
.user-profile-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pdc-gray-700);
}
.user-profile-arrow {
  color: var(--pdc-gray-400);
  width: 14px;
  height: 14px;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--surface-card-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: all 200ms var(--ease-out-expo);
  z-index: 100;
}
.user-dropdown-container:hover .dropdown-menu,
.user-dropdown-container:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--pdc-gray-600);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.dropdown-item:hover {
  background: var(--pdc-gray-50);
  color: var(--pdc-gray-900);
}
.dropdown-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}
.dropdown-divider {
  height: 1px;
  background: var(--pdc-gray-100);
  margin: 4px 0;
}
.dropdown-item.danger {
  color: var(--pdc-error);
}
.dropdown-item.danger:hover {
  background: var(--pdc-error-light);
  color: var(--pdc-error);
}

/* Expandable Header Search */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
}
.header-search-icon {
  position: absolute;
  left: 8px;
  width: 24px;
  height: 24px;
  color: var(--pdc-gray-600);
  pointer-events: none;
  transition: color 0.3s;
}
.header-search-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2.25;
}
.header-search-input {
  width: 40px;
  height: 40px;
  padding: 8px 16px 8px 36px;
  border: 1px solid transparent;
  border-radius: 40px;
  background: transparent;
  font-size: 0.875rem;
  color: var(--pdc-gray-800);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  cursor: pointer;
}
.header-search-input:hover {
  background: var(--pdc-gray-50);
}
.header-search-input::placeholder {
  color: transparent;
  transition: color 0.2s;
}
.header-search-input:focus,
.header-search-input:not(:placeholder-shown) {
  width: 240px;
  background: var(--surface-card);
  border-color: var(--pdc-gray-200);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  cursor: text;
}
.header-search-input:focus::placeholder,
.header-search-input:not(:placeholder-shown)::placeholder {
  color: var(--pdc-gray-400);
}
.header-search-input:focus + .header-search-icon {
  color: var(--pdc-blue-500);
}

/* --- Metric Cards --- */
.metrics-row {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.metric-card {
  flex: 1;
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: all 300ms var(--ease-out-expo);
}
.metric-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.metric-icon svg { width: 22px; height: 22px; stroke-width: 1.75; }
.metric-icon.blue { background: linear-gradient(135deg, var(--pdc-blue-100), var(--pdc-blue-50)); color: var(--pdc-blue-600); }
.metric-icon.red { background: linear-gradient(135deg, var(--pdc-error-light), #fef2f2); color: var(--pdc-error); }
.metric-icon.green { background: linear-gradient(135deg, var(--pdc-success-light), #ecfdf5); color: var(--pdc-success); }
.metric-info { flex: 1; }
.metric-label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; color: var(--pdc-gray-500); letter-spacing: 0.06em; margin-bottom: 6px; }
.metric-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--pdc-gray-900); line-height: 1.2; display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.metric-value small { font-size: 0.875rem; color: var(--pdc-gray-400); font-weight: 500; }
.metric-sub { font-size: 0.75rem; color: var(--pdc-gray-500); margin-top: 4px; }

/* --- Draggable Table --- */
.candidati-table-wrapper {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.candidati-header {
  padding: 24px;
  border-bottom: 1px solid var(--pdc-gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.candidati-header h2 { font-size: 1.125rem; margin: 0; }
.candidati-header p { font-size: 0.8125rem; color: var(--pdc-gray-500); margin-top: 2px; }
.candidati-header-actions { display: flex; gap: 10px; }

.table-custom { width: 100%; border-collapse: collapse; }
.table-custom th {
  padding: 12px 24px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--pdc-gray-400);
  letter-spacing: 0.06em;
  background: var(--pdc-gray-50);
  border-bottom: 1px solid var(--pdc-gray-100);
}
.table-custom td {
  padding: 14px 24px;
  vertical-align: middle;
  border-bottom: 1px solid var(--pdc-gray-50);
}
.table-custom tbody tr { transition: all 200ms var(--ease-out-expo); background: transparent; }
.table-custom tbody tr:hover { background: rgba(59,130,246,0.03); }
.table-custom tbody tr.sortable-ghost { opacity: 0.4; background: var(--pdc-blue-50); }

.drag-handle { cursor: grab; color: var(--pdc-gray-300); display: flex; align-items: center; justify-content: center; transition: color var(--transition-fast); }
.drag-handle:hover { color: var(--pdc-gray-500); }
.drag-handle:active { cursor: grabbing; }

.cand-cell-pos { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--pdc-gray-600); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.cand-cell-user { display: flex; align-items: center; gap: 14px; }
.cand-cell-user .avatar { width: 40px; height: 40px; border-radius: 50%; font-size: 0.875rem; flex-shrink:0; border: 2px solid rgba(255,255,255,0.8); box-shadow: var(--shadow-sm); }
.cand-cell-user-info { display: flex; flex-direction: column; gap: 1px; }
.cand-cell-user-name { font-weight: 600; color: var(--pdc-gray-900); font-size: 0.875rem; }
.cand-cell-user-sub { font-size: 0.75rem; color: var(--pdc-gray-400); }

.cand-cell-contacts { display: flex; flex-direction: column; gap: 3px; font-size: 0.75rem; color: var(--pdc-gray-500); }
.cand-cell-contacts span { display: flex; align-items: center; gap: 6px; }
.cand-cell-contacts svg { width: 14px; height: 14px; color: var(--pdc-gray-400); stroke-width: 1.75; }

.cand-cell-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.action-btn { width: 32px; height: 32px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--pdc-gray-400); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 200ms var(--ease-out-expo); }
.action-btn:hover { background: var(--pdc-gray-100); color: var(--pdc-gray-700); transform: scale(1.05); }
.action-btn.delete:hover { background: var(--pdc-error-light); color: var(--pdc-error); }

/* --- Status Buttons (Docs) --- */
.doc-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: var(--radius-sm); font-size: 0.6875rem; font-weight: 600;
  border: none; cursor: pointer; transition: all 200ms var(--ease-out-expo);
  letter-spacing: 0.01em;
}
.doc-btn svg { width: 13px; height: 13px; stroke-width: 2; }
.doc-btn.success { background: var(--pdc-success-light); color: #065f46; }
.doc-btn.success:hover { background: #a7f3d0; transform: translateY(-1px); }
.doc-btn.error { background: var(--pdc-error-light); color: #991b1b; }
.doc-btn.error:hover { background: #fecaca; transform: translateY(-1px); }

/* --- Modals --- */
.modal-lg { max-width: 720px; }
.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.file-upload-area {
  border: 1.5px dashed var(--pdc-gray-200); border-radius: var(--radius-md);
  padding: 20px; text-align: center; cursor: pointer; transition: all 200ms var(--ease-out-expo);
  background: var(--pdc-gray-50);
}
.file-upload-area:hover { border-color: var(--pdc-blue-400); background: var(--pdc-blue-50); }
.file-upload-area svg { width: 22px; height: 22px; color: var(--pdc-gray-400); margin: 0 auto 6px; stroke-width: 1.75; }
.file-upload-area p { font-size: 0.75rem; color: var(--pdc-gray-500); margin: 0; }

