/* ============================================================
   PeopleCorp – Main Stylesheet
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:          #ed4700;
  --primary-dark:     #c73c00;
  --primary-light:    #ff6a2f;
  --primary-10:       rgba(237, 71, 0, 0.10);
  --secondary:        #111157;
  --secondary-light:  #1a1a7e;
  --secondary-10:     rgba(17, 17, 87, 0.10);

  /* DISC Colors */
  --disc-d:           #e74c3c;
  --disc-d-bg:        #fdf2f2;
  --disc-i:           #f39c12;
  --disc-i-bg:        #fef9ec;
  --disc-s:           #27ae60;
  --disc-s-bg:        #f0faf5;
  --disc-c:           #3498db;
  --disc-c-bg:        #edf6fd;

  /* Status Colors — contrast-safe (WCAG AA on their bg) */
  --status-ativo:     #15803d;
  --status-ativo-bg:  #dcfce7;
  --status-inativo:   #4b5563;
  --status-inativo-bg:#f3f4f6;
  --status-candidato: #1d4ed8;
  --status-candidato-bg: #dbeafe;
  --status-colaborador: #b45309;
  --status-colaborador-bg: #fef3c7;

  /* Neutral */
  --white:     #ffffff;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;

  /* Semantic */
  --success:   #16a34a;
  --success-bg: #dcfce7;
  --error:     #dc2626;
  --error-bg:  #fee2e2;
  --warning:   #d97706;
  --warning-bg:#fef3c7;
  --info:      #2563eb;
  --info-bg:   #dbeafe;

  /* Layout */
  --sidebar-width:         260px;
  --sidebar-collapsed:     72px;
  --header-height:         64px;
  --radius-sm:             6px;
  --radius:                10px;
  --radius-lg:             14px;
  --radius-xl:             20px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:      0 4px 12px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg:   0 10px 30px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.07);
  --shadow-xl:   0 20px 60px rgba(0,0,0,0.15);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
}

/* ── Dark Theme ───────────────────────────────────────────── */
[data-theme="dark"] {
  --primary:          #f97316;
  --primary-dark:     #ea580c;
  --primary-light:    #fb923c;
  --primary-10:       rgba(249, 115, 22, 0.12);
  --secondary:        #1e1e2e;
  --secondary-light:  #2a2a3e;
  --secondary-10:     rgba(30, 30, 46, 0.15);

  --disc-d:     #f87171; --disc-d-bg: rgba(248,113,113,0.12);
  --disc-i:     #fbbf24; --disc-i-bg: rgba(251,191,36,0.12);
  --disc-s:     #4ade80; --disc-s-bg: rgba(74,222,128,0.12);
  --disc-c:     #60a5fa; --disc-c-bg: rgba(96,165,250,0.12);

  --status-ativo:     #4ade80; --status-ativo-bg:     rgba(74,222,128,0.15);
  --status-inativo:   #9ca3af; --status-inativo-bg:   rgba(156,163,175,0.15);
  --status-candidato: #60a5fa; --status-candidato-bg: rgba(96,165,250,0.15);
  --status-colaborador:#fbbf24; --status-colaborador-bg:rgba(251,191,36,0.15);

  --white:     #1a1a2e;
  --gray-50:   #12121e;
  --gray-100:  #1e1e30;
  --gray-200:  #2a2a40;
  --gray-300:  #3a3a52;
  --gray-400:  #6b7280;
  --gray-500:  #9ca3af;
  --gray-600:  #d1d5db;
  --gray-700:  #e5e7eb;
  --gray-800:  #f3f4f6;
  --gray-900:  #f9fafb;

  --success:    #4ade80; --success-bg: rgba(74,222,128,0.15);
  --error:      #f87171; --error-bg:   rgba(248,113,113,0.15);
  --warning:    #fbbf24; --warning-bg: rgba(251,191,36,0.15);
  --info:       #60a5fa; --info-bg:    rgba(96,165,250,0.15);

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow:     0 4px 12px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.25);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.5);
}

[data-theme="dark"] body { color-scheme: dark; }

/* Dark mode – sidebar already dark, keep it consistent */
[data-theme="dark"] .sidebar {
  background: #13131f;
  border-right: 1px solid #2a2a40;
}
[data-theme="dark"] .sidebar-header { border-bottom-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .sidebar-footer { border-top-color: rgba(255,255,255,0.06); }

/* Dark mode – override hardcoded backgrounds */
[data-theme="dark"] .top-header { background: #1a1a2e; border-bottom-color: #2a2a40; }
[data-theme="dark"] .page-content { background: #12121e; }
[data-theme="dark"] .card { background: #1a1a2e; border-color: #2a2a40; }
[data-theme="dark"] .stat-card { background: #1a1a2e; border-color: #2a2a40; }
[data-theme="dark"] .card-footer { background: #161624; border-top-color: #2a2a40; }
[data-theme="dark"] .card-header { border-bottom-color: #2a2a40; }
[data-theme="dark"] .modal-container,
[data-theme="dark"] .modal-overlay > .modal { background: #1e1e30; }
[data-theme="dark"] .modal-header { border-bottom-color: #2a2a40; }
[data-theme="dark"] .modal-footer { border-top-color: #2a2a40; background: #1a1a2e; }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }

/* Dark form controls */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select { background: #16162a; border-color: #3a3a52; color: #e5e7eb; }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-select:disabled { background: #12121e; color: #6b7280; }
[data-theme="dark"] select.form-control,
[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
[data-theme="dark"] .form-control::placeholder { color: #6b7280; }

/* Dark tables */
[data-theme="dark"] table { border-color: #2a2a40; }
[data-theme="dark"] th { background: #16162a !important; color: #d1d5db; border-bottom-color: #2a2a40 !important; }
[data-theme="dark"] td { border-bottom-color: #22223a !important; }
[data-theme="dark"] tr:hover td { background: rgba(249,115,22,0.04); }

/* Dark toast */
[data-theme="dark"] .toast { background: #1e1e30; border-color: #3a3a52; }

/* Dark logout button */
[data-theme="dark"] .btn-logout { border-color: #3a3a52; color: #d1d5db; }
[data-theme="dark"] .btn-logout:hover { background: rgba(248,113,113,0.1); border-color: #f87171; color: #f87171; }

/* Dark buttons */
[data-theme="dark"] .btn-outline { color: #d1d5db; border-color: #3a3a52; }
[data-theme="dark"] .btn-outline:hover:not(:disabled) { background: #2a2a40; border-color: #6b7280; color: #f3f4f6; }
[data-theme="dark"] .btn-ghost { color: #d1d5db; }
[data-theme="dark"] .btn-ghost:hover:not(:disabled) { background: #2a2a40; color: #f3f4f6; }

/* Dark scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track { background: #1a1a2e; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a3a52; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* Dark profile header – keep gradient visible */
[data-theme="dark"] .profile-header { background: linear-gradient(135deg, #1e1e30, #2a2a44); }

/* Dark badge overrides for better contrast */
[data-theme="dark"] .badge-gray { background: #2a2a40; color: #d1d5db; }
[data-theme="dark"] .badge-primary { background: rgba(249,115,22,0.15); color: #fb923c; }
[data-theme="dark"] .badge-success { background: rgba(74,222,128,0.15); color: #4ade80; }
[data-theme="dark"] .badge-error   { background: rgba(248,113,113,0.15); color: #f87171; }
[data-theme="dark"] .badge-warning { background: rgba(251,191,36,0.15); color: #fbbf24; }
[data-theme="dark"] .badge-info    { background: rgba(96,165,250,0.15);  color: #60a5fa; }

/* Dark confirm dialog */
[data-theme="dark"] .confirm-icon.danger { background: rgba(248,113,113,0.15); color: #f87171; }
[data-theme="dark"] .confirm-icon.warning { background: rgba(251,191,36,0.15); color: #fbbf24; }

/* Dark modal close hover */
[data-theme="dark"] .modal-close:hover { color: #f87171; background: rgba(248,113,113,0.1); }

/* Dark stat icon backgrounds */
[data-theme="dark"] .stat-icon.orange { background: rgba(249,115,22,0.15); }
[data-theme="dark"] .stat-icon.blue   { background: rgba(96,165,250,0.15); }
[data-theme="dark"] .stat-icon.green  { background: rgba(74,222,128,0.15); }
[data-theme="dark"] .stat-icon.amber  { background: rgba(251,191,36,0.15); }
[data-theme="dark"] .stat-icon.red    { background: rgba(248,113,113,0.15); }
[data-theme="dark"] .stat-icon.purple { background: rgba(139,92,246,0.15); color: #a78bfa; }
[data-theme="dark"] .stat-icon.teal   { background: rgba(34,211,238,0.15); color: #22d3ee; }

/* Dark nav link active on sidebar */
[data-theme="dark"] .nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}

/* Dark mode – tabs and filters */
[data-theme="dark"] .auto-tab { color: #9ca3af; }
[data-theme="dark"] .auto-tab--active { color: var(--primary); border-bottom-color: var(--primary); }
[data-theme="dark"] .auto-card { background: #1e1e30; border-color: #2a2a40; }
[data-theme="dark"] .auto-card--inactive { opacity: 0.6; }

/* Dark automations */
[data-theme="dark"] .auto-hist-indicators { background: transparent; }
[data-theme="dark"] .auto-card-btn { color: #9ca3af; }
[data-theme="dark"] .auto-card-btn:hover { background: #2a2a40; color: #f3f4f6; }

/* Dark Kanban */
[data-theme="dark"] .kb-column { background: #16162a; }
[data-theme="dark"] .kb-card { background: #1e1e30; border-color: #2a2a40; }
[data-theme="dark"] .kb-card:hover { border-color: #3a3a52; }

/* Dark dashboard v2 */
[data-theme="dark"] .dash2 { background: transparent; }
[data-theme="dark"] .dash2-card { background: #1a1a2e; border-color: #2a2a40; }
[data-theme="dark"] .dash2-card-head { border-bottom-color: #2a2a40; }
[data-theme="dark"] .dash2-hero-card { background: #1a1a2e; border-color: #2a2a40; }
[data-theme="dark"] .dash2-sec-card { background: #1a1a2e; border-color: #2a2a40; }
[data-theme="dark"] .cm-kpi { background: #1a1a2e; border-color: #2a2a40; }
[data-theme="dark"] .cm-chart-card { background: #1a1a2e; border-color: #2a2a40; }
[data-theme="dark"] .dash2-activity-card { background: #1a1a2e; border-color: #2a2a40; }
[data-theme="dark"] .alert-warning { background: rgba(251,191,36,0.1); border-color: #92400e; color: #fbbf24; }
[data-theme="dark"] .alert-info { background: rgba(96,165,250,0.1); border-color: #1d4ed8; color: #60a5fa; }

/* Dark Chart.js backgrounds – override inline chart backgrounds */
[data-theme="dark"] canvas { filter: none; }

/* Dark – misc hardcoded whites */
[data-theme="dark"] .loading-overlay { background: rgba(18,18,30,0.8); }
[data-theme="dark"] .empty-state { color: #9ca3af; }
[data-theme="dark"] .sidebar-overlay { background: rgba(0,0,0,0.6); }

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-600);
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-10);
}
.theme-toggle .fa-sun  { display: none; }
.theme-toggle .fa-moon { display: inline-block; }
[data-theme="dark"] .theme-toggle .fa-sun  { display: inline-block; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle { border-color: #3a3a52; color: #fbbf24; }
[data-theme="dark"] .theme-toggle:hover { border-color: #fbbf24; background: rgba(251,191,36,0.1); }

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

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

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

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

/* ── Typography ────────────────────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); }
h2 { font-size: 1.375rem; font-weight: 600; color: var(--gray-800); }
h3 { font-size: 1.125rem; font-weight: 600; color: var(--gray-800); }
h4 { font-size: 1rem; font-weight: 600; color: var(--gray-700); }

/* ── App Layout ────────────────────────────────────────────── */
.app-body { overflow: hidden; height: 100vh; }

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--secondary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition-slow), transform var(--transition-slow);
  position: relative;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 72px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sidebar-logo-img {
  max-width: 140px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.sidebar-logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.sidebar-close:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.sidebar-app-name {
  padding: 12px 20px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
}

.sidebar-nav { flex: 1; padding: 4px 0 12px; }

.nav-list { padding: 0 8px; }

.nav-divider {
  padding: 16px 12px 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
}

.nav-item { margin-bottom: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
}

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

.nav-link.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(237, 71, 0, 0.35);
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-label { flex: 1; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  cursor: default;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
}
.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

/* ── Main Wrapper ──────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Top Header ────────────────────────────────────────────── */
.top-header {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.menu-toggle:hover {
  color: var(--primary);
  background: var(--primary-10);
}

.breadcrumb {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-700);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--gray-100);
}
.user-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.user-info-sm {
  display: flex;
  flex-direction: column;
}

.user-name-sm {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.2;
}

.user-role-sm {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.btn-logout:hover {
  border-color: var(--error);
  color: var(--error);
  background: #fef2f2;
}

/* ── Page Content ──────────────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header-left h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.page-header-left p,
.page-header p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

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

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

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

.card-header h2,
.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.card-body { padding: 20px; }

.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ── Stats Grid ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-icon.orange  { background: rgba(237,71,0,0.1);  color: var(--primary); }
.stat-icon.blue    { background: rgba(52,152,219,0.1); color: var(--disc-c); }
.stat-icon.green   { background: rgba(39,174,96,0.1);  color: var(--disc-s); }
.stat-icon.amber   { background: rgba(243,156,18,0.1); color: var(--disc-i); }
.stat-icon.red     { background: rgba(231,76,60,0.1);  color: var(--disc-d); }
.stat-icon.purple  { background: rgba(17,17,87,0.1);   color: var(--secondary); }
.stat-icon.teal    { background: rgba(6,182,212,0.1);  color: #06b6d4; }

.stat-content { flex: 1; min-width: 0; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  margin-top: 6px;
  font-weight: 500;
}

.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--error); }
.stat-trend.neutral { color: var(--gray-500); }

/* ── Charts Row ────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  margin-bottom: 24px;
}

.charts-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.chart-container {
  position: relative;
  width: 100%;
}

.chart-canvas-wrap {
  position: relative;
  height: 260px;
  padding: 8px;
}

.radar-chart-wrap {
  position: relative;
  height: 300px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── DISC Score Bars ───────────────────────────────────────── */
.disc-scores {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.disc-score-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.disc-score-label {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.disc-score-label.D { background: var(--disc-d); }
.disc-score-label.I { background: var(--disc-i); }
.disc-score-label.S { background: var(--disc-s); }
.disc-score-label.C { background: var(--disc-c); }

.disc-score-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--gray-100);
  border-radius: 5px;
  overflow: hidden;
}

.disc-score-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.disc-score-bar.D { background: linear-gradient(90deg, var(--disc-d), #c0392b); }
.disc-score-bar.I { background: linear-gradient(90deg, var(--disc-i), #e67e22); }
.disc-score-bar.S { background: linear-gradient(90deg, var(--disc-s), #229954); }
.disc-score-bar.C { background: linear-gradient(90deg, var(--disc-c), #2980b9); }

.disc-score-pct {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  min-width: 36px;
  text-align: right;
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* DISC Profile Badges */
.badge-disc-D { background: var(--disc-d-bg); color: var(--disc-d); }
.badge-disc-I { background: var(--disc-i-bg); color: var(--disc-i); }
.badge-disc-S { background: var(--disc-s-bg); color: var(--disc-s); }
.badge-disc-C { background: var(--disc-c-bg); color: var(--disc-c); }

/* Status Badges */
.badge-ativo       { background: var(--status-ativo-bg);       color: var(--status-ativo); }
.badge-inativo     { background: var(--status-inativo-bg);     color: var(--status-inativo); }
.badge-candidato   { background: var(--status-candidato-bg);   color: var(--status-candidato); }
.badge-colaborador { background: var(--status-colaborador-bg); color: var(--status-colaborador); }

/* Generic Badges — contrast-safe */
.badge-success { background: #dcfce7; color: #15803d; }
.badge-error   { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }
.badge-primary { background: rgba(237,71,0,0.1); color: var(--primary); }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

tbody tr:hover { background: var(--gray-50); }

tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 12px 16px;
  color: var(--gray-700);
  vertical-align: middle;
}

tbody tr:nth-child(even) { background: rgba(249,250,251,0.5); }
tbody tr:nth-child(even):hover { background: var(--gray-50); }

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--gray-500);
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.0625rem;
  color: var(--gray-600);
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--gray-400);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 14px rgba(237,71,0,0.35);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--white);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--secondary-light);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-outline:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-800);
  text-decoration: none;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover:not(:disabled) {
  background: var(--primary-10);
  text-decoration: none;
  color: var(--primary);
}

.btn-danger {
  background: var(--error);
  color: var(--white);
  border-color: var(--error);
}
.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.btn-success:hover:not(:disabled) {
  background: #16a34a;
  text-decoration: none;
  color: var(--white);
}

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

.btn-lg {
  padding: 12px 22px;
  font-size: 1rem;
}

.btn-icon {
  padding: 7px;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
}

.btn-loading .btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237,71,0,0.1);
}

.form-control.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-control:disabled {
  background: var(--gray-50);
  color: var(--gray-500);
  cursor: not-allowed;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' 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 10px center;
  background-size: 16px;
  padding-right: 36px;
}
select.form-control:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ed4700' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
select.form-control:disabled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* ── form-select (alias / standalone select element) ─── */
select.form-select, .form-select {
  display: block;
  width: 100%;
  padding: 8px 36px 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--gray-800);
  background-color: var(--white);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' 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 10px center;
  background-size: 16px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
select.form-select:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237, 71, 0, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ed4700' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
select.form-select:disabled, .form-select:disabled {
  background-color: var(--gray-50);
  color: var(--gray-400);
  cursor: not-allowed;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

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

.form-hint {
  color: var(--gray-500);
  font-size: 0.8125rem;
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.form-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 8px;
  margin-bottom: 16px;
  margin-top: 8px;
}

/* Radio & Checkbox groups */
.radio-group, .checkbox-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── Filter Bar ────────────────────────────────────────────── */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-item { min-width: 0; }

.filter-search {
  position: relative;
  min-width: 200px;
  flex: 1;
}

.filter-search input {
  padding-left: 36px;
}

.filter-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.875rem;
  pointer-events: none;
}

.filter-select { min-width: 150px; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-current {
  min-width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary);
  background: var(--primary);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-overlay.open { display: flex; }

.modal-container,
.modal-overlay > .modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-container.modal-lg { max-width: 800px; }
.modal-container.modal-xl { max-width: 1000px; }
.modal-container.modal-sm { max-width: 420px; }

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

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 1.125rem;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.modal-close:hover { color: var(--error); background: #fef2f2; }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Toast Notifications ───────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
  width: 100%;
}

.toast {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 4px solid;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-removing {
  animation: toastOut 0.3s ease forwards;
}

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

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

.toast-success { border-color: var(--success); }
.toast-error   { border-color: var(--error); }
.toast-warning { border-color: var(--warning); }
.toast-info    { border-color: var(--info); }

.toast-icon { font-size: 1.125rem; margin-top: 1px; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--error); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info    .toast-icon { color: var(--info); }

.toast-content { flex: 1; }
.toast-title   { font-weight: 600; font-size: 0.875rem; color: var(--gray-800); }
.toast-msg     { font-size: 0.8125rem; color: var(--gray-600); margin-top: 2px; }

.toast-dismiss {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px;
  flex-shrink: 0;
  transition: color var(--transition);
}

.toast-dismiss:hover { color: var(--gray-600); }

/* ── Loading Overlay ───────────────────────────────────────── */
.global-loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(3px);
}

.global-loading.visible { display: flex; }

.loading-spinner-lg {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--gray-500);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover { color: var(--gray-800); }

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-count {
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
}

.tab-btn.active .tab-count {
  background: rgba(237,71,0,0.1);
  color: var(--primary);
}

/* ── Profile Card ──────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  color: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.3);
}

.profile-info h2 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.profile-info p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

.profile-badges {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ── Assessment Wizard ─────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 16px);
  width: 80px;
  height: 2px;
  background: var(--gray-200);
}

.wizard-step.completed::after { background: var(--primary); }

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  border: 2px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-400);
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

.wizard-step.active .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.wizard-step.completed .step-circle {
  border-color: var(--success);
  background: var(--success);
  color: var(--white);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  white-space: nowrap;
}

.wizard-step.active .step-label { color: var(--primary); font-weight: 600; }
.wizard-step.completed .step-label { color: var(--success); }

/* Question Scale */
.question-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.question-card:hover { border-color: var(--gray-300); }
.question-card.answered { border-color: var(--success); background: #f0fdf4; }

.question-text {
  font-size: 0.9375rem;
  color: var(--gray-800);
  margin-bottom: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.question-dim {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.scale-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.scale-btn {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.scale-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-10);
}

.scale-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.scale-value {
  font-size: 1rem;
  font-weight: 700;
}

.scale-label {
  font-size: 0.65rem;
  line-height: 1.2;
  text-align: center;
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a5f; }

/* ── Interpretation Panel ──────────────────────────────────── */
.interpretation-panel {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.interpretation-header {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.interpretation-body {
  padding: 16px;
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.65;
}

.interpretation-D .interpretation-header { background: var(--disc-d-bg); color: var(--disc-d); }
.interpretation-I .interpretation-header { background: var(--disc-i-bg); color: var(--disc-i); }
.interpretation-S .interpretation-header { background: var(--disc-s-bg); color: var(--disc-s); }
.interpretation-C .interpretation-header { background: var(--disc-c-bg); color: var(--disc-c); }

/* ── Autocomplete ──────────────────────────────────────────── */
.autocomplete-wrapper { position: relative; }

.autocomplete-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--gray-50); }
.autocomplete-item.selected { background: var(--primary-10); color: var(--primary); }

/* ── Progress Indicator ────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--gray-200);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.5s ease;
}

/* ── Confirm Dialog ────────────────────────────────────────── */
.confirm-content { text-align: center; padding: 8px 0; }
.confirm-icon { font-size: 3rem; margin-bottom: 16px; }
.confirm-icon.danger { color: var(--error); }
.confirm-icon.warning { color: var(--warning); }
.confirm-title { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.confirm-msg { font-size: 0.9rem; color: var(--gray-600); line-height: 1.5; }

/* ── Section Divider ───────────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 20px 0;
}

/* ── Info Grid ─────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.info-item { }

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.info-value {
  font-size: 0.9375rem;
  color: var(--gray-800);
  font-weight: 500;
}

/* ── Compare Panel ─────────────────────────────────────────── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-400);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Settings Sections ─────────────────────────────────────── */
.settings-section { margin-bottom: 28px; }
.settings-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

/* ── Report Styles ─────────────────────────────────────────── */
.report-preview {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  min-height: 400px;
}

/* ── DISC Dimension Tabs ───────────────────────────────────── */
.dim-tab { border-bottom: 2px solid transparent; }
.dim-tab.active-D { color: var(--disc-d); border-color: var(--disc-d); }
.dim-tab.active-I { color: var(--disc-i); border-color: var(--disc-i); }
.dim-tab.active-S { color: var(--disc-s); border-color: var(--disc-s); }
.dim-tab.active-C { color: var(--disc-c); border-color: var(--disc-c); }
.dim-tab.active-ALL { color: var(--primary); border-color: var(--primary); }

/* ── Drag Handle ───────────────────────────────────────────── */
.drag-handle {
  cursor: grab;
  color: var(--gray-400);
  padding: 0 4px;
  font-size: 0.875rem;
}

.drag-handle:active { cursor: grabbing; }

/* ── Dashboard Alerts Section ──────────────────────────────── */
.alerts-section { margin-top: 24px; }

.alert-row { }
.alert-row td { vertical-align: middle; }

/* ── Floating Action Button ────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  font-size: 1.25rem;
  box-shadow: 0 4px 16px rgba(237,71,0,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 200;
}

.fab:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(237,71,0,0.5);
}

/* ── Collaborator Metrics Panel ────────────────────────────── */
.cm-panel { margin-bottom: 20px; }
.cm-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cm-kpi {
  background: #fff; border-radius: 14px; padding: 16px; border: 1.5px solid var(--gray-100);
  display: flex; align-items: center; gap: 12px; transition: all .15s;
}
.cm-kpi:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.cm-kpi-icon {
  width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; flex-shrink: 0;
}
.cm-kpi-data { min-width: 0; }
.cm-kpi-value { font-size: 1.15rem; font-weight: 800; color: var(--gray-900); line-height: 1.2; letter-spacing: -0.02em; }
.cm-kpi-label { font-size: 0.68rem; font-weight: 500; color: var(--gray-400); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-shimmer { animation: shimmer 1.5s infinite alternate; }

.cm-charts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cm-chart-card {
  background: #fff; border-radius: 14px; border: 1.5px solid var(--gray-100); padding: 18px;
  transition: box-shadow .15s;
}
.cm-chart-card:hover { box-shadow: var(--shadow-sm); }
.cm-chart-title {
  font-size: 0.78rem; font-weight: 700; color: var(--gray-700); margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
}
.cm-chart-title i { color: var(--primary); font-size: 0.8rem; }

/* Bar items */
.cm-bar-list { display: flex; flex-direction: column; gap: 10px; }
.cm-bar-item { }
.cm-bar-compact { gap: 4px; }
.cm-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cm-bar-header span:first-child { font-size: 0.78rem; font-weight: 500; color: var(--gray-700); }
.cm-bar-count { font-size: 0.75rem; font-weight: 700; color: var(--gray-600); }
.cm-bar-track { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.cm-bar-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }

/* Gender */
.cm-gender-list { display: flex; flex-direction: column; gap: 12px; }

/* DISC mini grid */
.cm-disc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cm-disc-item { display: flex; flex-direction: column; gap: 6px; }
.cm-disc-badge {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem;
}
.cm-disc-data { display: flex; align-items: baseline; gap: 6px; }
.cm-disc-val { font-size: 1.1rem; font-weight: 800; color: var(--gray-800); }
.cm-disc-pct { font-size: 0.72rem; color: var(--gray-400); }

/* Age vertical bars */
.cm-age-bars { display: flex; align-items: flex-end; gap: 12px; height: 140px; padding-top: 10px; }
.cm-age-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.cm-age-val { font-size: 0.72rem; font-weight: 700; color: var(--gray-600); margin-bottom: 4px; }
.cm-age-bar-v { width: 100%; max-width: 36px; background: linear-gradient(180deg, #6366f1, #8b5cf6); border-radius: 4px 4px 0 0; transition: height .5s; }
.cm-age-label { font-size: 0.65rem; color: var(--gray-400); margin-top: 6px; white-space: nowrap; }

.cm-empty { font-size: 0.8rem; color: var(--gray-400); text-align: center; padding: 16px; }

@media (max-width: 1024px) {
  .cm-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .cm-charts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .cm-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .cm-charts-grid { grid-template-columns: 1fr; }
}

/* ── Dashboard v2 ─────────────────────────────────────────── */
.dash2 { max-width: 100%; }
.dash2-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.dash2-greeting { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--gray-900); letter-spacing: -0.02em; }
.dash2-subtitle { color: var(--gray-400); margin: 4px 0 0; font-size: 0.85rem; }
.dash2-header-actions { display: flex; align-items: center; gap: 10px; }
.dash2-ts { font-size: 0.78rem; color: var(--gray-400); }
.dash2-refresh-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--gray-200); background: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-500);
  transition: all .15s;
}
.dash2-refresh-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-10); }

/* Pills */
.dash2-pills { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.dash2-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px;
  font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: all .15s;
  border: 1.5px solid transparent;
}
.dash2-pill--primary { background: rgba(99,102,241,.08); color: #6366f1; border-color: rgba(99,102,241,.15); }
.dash2-pill--primary:hover { background: rgba(99,102,241,.16); text-decoration: none; transform: translateY(-1px); }
.dash2-pill--success { background: rgba(16,185,129,.08); color: #10b981; border-color: rgba(16,185,129,.15); }
.dash2-pill--success:hover { background: rgba(16,185,129,.16); text-decoration: none; transform: translateY(-1px); }
.dash2-pill--purple { background: rgba(139,92,246,.08); color: #8b5cf6; border-color: rgba(139,92,246,.15); }
.dash2-pill--purple:hover { background: rgba(139,92,246,.16); text-decoration: none; transform: translateY(-1px); }
.dash2-pill--orange { background: rgba(249,115,22,.08); color: #f97316; border-color: rgba(249,115,22,.15); }
.dash2-pill--orange:hover { background: rgba(249,115,22,.16); text-decoration: none; transform: translateY(-1px); }

/* Hero KPI grid */
.dash2-hero-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.dash2-hero-card {
  background: #fff; border-radius: 16px; padding: 22px; border: 1.5px solid var(--gray-100);
  transition: all .2s; position: relative; overflow: hidden;
}
.dash2-hero-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--gray-200); }
.dash2-hero-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; margin-bottom: 16px;
}
.dash2-hero-value { font-size: 2rem; font-weight: 800; color: var(--gray-900); line-height: 1; letter-spacing: -0.03em; }
.dash2-hero-label { font-size: 0.82rem; font-weight: 500; color: var(--gray-500); margin-top: 4px; }
.dash2-hero-sub { font-size: 0.72rem; font-weight: 600; margin-top: 10px; display: flex; align-items: center; gap: 4px; }
.dash2-shimmer { animation: shimmer 1.5s infinite alternate; }
@keyframes shimmer { from { opacity: 1; } to { opacity: 0.5; } }

/* Secondary KPI grid */
.dash2-sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.dash2-sec-card {
  background: #fff; border-radius: 12px; padding: 16px 18px; border: 1.5px solid var(--gray-100);
  transition: all .15s; text-align: center;
}
.dash2-sec-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.dash2-sec-value { font-size: 1.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.dash2-sec-label { font-size: 0.72rem; font-weight: 500; color: var(--gray-400); margin-top: 4px; }

/* Cards */
.dash2-card {
  background: #fff; border-radius: 16px; border: 1.5px solid var(--gray-100); overflow: hidden;
}
.dash2-card-head {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.dash2-card-title { font-size: 0.875rem; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.dash2-card-title i { color: var(--primary); font-size: 0.85rem; }
.dash2-card-link {
  font-size: 0.75rem; font-weight: 600; color: var(--primary); text-decoration: none;
  display: flex; align-items: center; gap: 4px; transition: gap .15s;
}
.dash2-card-link:hover { gap: 6px; text-decoration: none; }
.dash2-card-body { padding: 20px; }
.dash2-loading { padding: 32px; text-align: center; }

/* Charts row */
.dash2-charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash2-card--flex2 { }

/* Bottom rows */
.dash2-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* Sectors */
.dash2-sector-list { display: flex; flex-direction: column; gap: 10px; }
.dash2-sector-row {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--gray-50); transition: background .1s;
}
.dash2-sector-row:hover { background: var(--gray-50); }
.dash2-sector-row:last-child { border-bottom: none; }
.dash2-sector-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-700); }
.dash2-sector-count { font-size: 0.7rem; color: var(--gray-400); display: block; }
.dash2-sector-bar-wrap { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.dash2-sector-bar { height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 3px; transition: width .5s; }
.dash2-sector-profiles { display: flex; gap: 3px; }

/* Coverage */
.dash2-section-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-400); margin-bottom: 12px; }
.dash2-cov-ring-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.dash2-cov-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.dash2-cov-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash2-cov-pct {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 1.1rem; font-weight: 800; color: var(--gray-800);
}
.dash2-cov-detail { display: flex; flex-direction: column; gap: 6px; }
.dash2-cov-row { font-size: 0.8rem; color: var(--gray-600); display: flex; align-items: center; gap: 6px; }
.dash2-cov-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dash2-divider { height: 1px; background: var(--gray-100); margin: 16px 0; }

/* Funil */
.dash2-pipeline { display: flex; flex-direction: column; gap: 8px; }
.dash2-pipe-item { }
.dash2-pipe-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.dash2-pipe-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dash2-pipe-label { font-size: 0.75rem; color: var(--gray-600); flex: 1; }
.dash2-pipe-value { font-size: 0.75rem; font-weight: 700; color: var(--gray-700); }
.dash2-pipe-bar-wrap { height: 4px; background: var(--gray-100); border-radius: 2px; overflow: hidden; }
.dash2-pipe-bar { height: 100%; border-radius: 2px; transition: width .5s; }

/* Activity list */
.dash2-activity-list { display: flex; flex-direction: column; }
.dash2-activity-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--gray-50); text-decoration: none; transition: background .1s;
}
.dash2-activity-item:hover { background: var(--gray-50); text-decoration: none; }
.dash2-activity-item:last-child { border-bottom: none; }
.dash2-activity-avatar {
  width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.dash2-activity-info { flex: 1; min-width: 0; }
.dash2-activity-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash2-activity-meta { font-size: 0.7rem; color: var(--gray-400); }
.dash2-activity-badges { display: flex; gap: 3px; flex-shrink: 0; }

/* Alert list */
.dash2-alert-list { display: flex; flex-direction: column; }
.dash2-alert-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--gray-50); text-decoration: none; transition: background .1s;
}
.dash2-alert-item:hover { background: rgba(239,68,68,.04); text-decoration: none; }
.dash2-alert-item:last-child { border-bottom: none; }
.dash2-alert-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(249,115,22,.1); color: #f97316; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; }
.dash2-alert-info { flex: 1; min-width: 0; }
.dash2-alert-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); }
.dash2-alert-detail { font-size: 0.72rem; color: var(--gray-500); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.dash2-alert-score { font-size: 0.8rem; font-weight: 700; color: #f97316; flex-shrink: 0; }

/* Empty state */
.dash2-empty { padding: 32px; text-align: center; color: var(--gray-400); font-size: 0.85rem; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dash2-empty i { font-size: 1.5rem; }
.dash2-empty--ok i { color: var(--success); }
.dash2-empty--ok span { color: var(--gray-500); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dash2-hero-grid { grid-template-columns: repeat(2, 1fr); }
  .dash2-sec-grid { grid-template-columns: repeat(2, 1fr); }
  .dash2-charts-row { grid-template-columns: 1fr; }
  .dash2-bottom-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .charts-row-3 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 100;
    box-shadow: var(--shadow-xl);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open { display: block; }

  .sidebar-close { display: flex; }

  .main-wrapper { width: 100%; }

  .stats-grid { grid-template-columns: 1fr; }
  .charts-row-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }

  .page-content { padding: 16px; }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-search { min-width: unset; }

  .header-user .user-info-sm { display: none; }

  .scale-buttons { gap: 4px; }
  .scale-label { display: none; }

  .wizard-steps { gap: 4px; }
  .wizard-step:not(:last-child)::after { width: 30px; }

  .table-wrapper { border-radius: 0; }

  .btn-logout span { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .modal-container { max-height: 95vh; }
  .pagination, .table-footer { flex-direction: column; align-items: flex-start; }
}

/* ── Automations Page ──────────────────────────────────────── */
.auto-page { max-width: 100%; }
.auto-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.auto-header-left { flex: 1; }
.auto-title { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--gray-900); display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
.auto-title i { color: var(--primary); font-size: 1.3rem; }
.auto-subtitle { color: var(--gray-400); margin: 4px 0 0; font-size: 0.85rem; }
.auto-header-right { display: flex; align-items: center; gap: 8px; }

.auto-stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.auto-stat-card { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--gray-100); border-radius: 12px; padding: 16px; transition: all .2s; }
.auto-stat-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.auto-stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.auto-stat-body { display: flex; flex-direction: column; }
.auto-stat-value { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); line-height: 1; letter-spacing: -0.02em; }
.auto-stat-label { font-size: 0.72rem; font-weight: 500; color: var(--gray-400); margin-top: 2px; }

.auto-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--gray-50); border-radius: 10px; padding: 4px; width: fit-content; }
.auto-tab { padding: 8px 18px; border: none; background: transparent; border-radius: 8px; font-size: 0.82rem; font-weight: 600; color: var(--gray-500); cursor: pointer; transition: all .2s; }
.auto-tab:hover { color: var(--gray-700); }
.auto-tab--active { background: var(--white); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.auto-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: 14px; padding: 20px; transition: all .25s; position: relative; overflow: hidden; }
.auto-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary); opacity: 0; transition: opacity .2s; }
.auto-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,.08); transform: translateY(-3px); }
.auto-card:hover::before { opacity: 1; }
.auto-card--inactive { opacity: .55; }
.auto-card--inactive:hover { opacity: .8; }

.auto-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.auto-card-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.auto-card-name { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--gray-800); }
.auto-card-desc { margin: 0 0 12px; font-size: 0.78rem; color: var(--gray-400); line-height: 1.4; }
.auto-card-flow { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.auto-card-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; border: 1px solid transparent; }
.auto-card-chip--action { background: rgba(237,71,0,.06); color: var(--primary); border-color: rgba(237,71,0,.15); }
.auto-card-arrow { font-size: 0.65rem; color: var(--gray-300); }

.auto-card-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding-top: 12px; border-top: 1px solid var(--gray-50); }
.auto-card-meta-item { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--gray-400); font-weight: 500; }
.auto-card-meta-item i { font-size: 0.68rem; }
.auto-card-meta-item--error { color: var(--error); }

.auto-card-actions { display: flex; gap: 4px; padding-top: 12px; border-top: 1px solid var(--gray-50); }
.auto-card-btn { width: 32px; height: 32px; border: 1px solid var(--gray-100); border-radius: 8px; background: var(--white); color: var(--gray-500); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; font-size: 0.78rem; }
.auto-card-btn:hover { background: var(--gray-50); color: var(--primary); border-color: var(--gray-200); }
.auto-card-btn--danger:hover { color: var(--error); background: #fef2f2; border-color: #fecaca; }

/* Toggle Switch */
.auto-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.auto-switch input { opacity: 0; width: 0; height: 0; }
.auto-switch-slider { position: absolute; cursor: pointer; inset: 0; background: var(--gray-200); border-radius: 22px; transition: .25s; }
.auto-switch-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.auto-switch input:checked + .auto-switch-slider { background: #22c55e; }
.auto-switch input:checked + .auto-switch-slider::before { transform: translateX(18px); }

/* Schedule Days */
.auto-days-row { display: flex; gap: 6px; flex-wrap: wrap; }
.auto-day-check { display: flex; align-items: center; justify-content: center; width: 42px; height: 36px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 0.75rem; font-weight: 600; color: var(--gray-500); cursor: pointer; transition: all .15s; user-select: none; }
.auto-day-check input { display: none; }
.auto-day-check:hover { border-color: var(--primary); color: var(--primary); }
.auto-day-check--active { background: var(--primary); border-color: var(--primary); color: white; }

/* Form Sections */
.auto-form-section { background: var(--gray-50); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.auto-form-section-title { font-size: 0.82rem; font-weight: 700; color: var(--gray-700); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.auto-form-section-title i { color: var(--primary); font-size: 0.85rem; }
.auto-info-box { background: rgba(59,130,246,.06); border: 1px solid rgba(59,130,246,.15); border-radius: 8px; padding: 12px 14px; font-size: 0.8rem; color: #3b82f6; display: flex; align-items: center; gap: 8px; }
.auto-info-box i { font-size: 0.85rem; flex-shrink: 0; }

/* Empty state */
.auto-empty { padding: 60px 20px; text-align: center; }
.auto-empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; background: var(--gray-50); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--gray-300); }
.auto-empty h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; color: var(--gray-700); }
.auto-empty p { margin: 0 0 20px; font-size: 0.85rem; color: var(--gray-400); }

/* Loading */
.auto-loading { padding: 40px; text-align: center; }

/* Modal */
.auto-modal-lg { width: 640px; max-width: 95vw; }

/* Logs Table */
.auto-log-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.auto-log-table thead { background: var(--gray-50); }
.auto-log-table th { padding: 10px 14px; text-align: left; font-weight: 600; color: var(--gray-600); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.auto-log-table td { padding: 10px 14px; border-bottom: 1px solid var(--gray-50); color: var(--gray-700); }
.auto-log-table tbody tr:hover { background: var(--gray-25, #fafafa); }
.auto-log-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; }
.auto-log-badge--success { background: rgba(34,197,94,.1); color: #22c55e; }
.auto-log-badge--error { background: rgba(239,68,68,.1); color: #ef4444; }
.auto-log-summary { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Main Tabs (Rules / History) */
.auto-main-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--gray-100); }
.auto-main-tab { padding: 12px 24px; border: none; background: transparent; font-size: 0.88rem; font-weight: 600; color: var(--gray-400); cursor: pointer; transition: all .2s; border-bottom: 2px solid transparent; margin-bottom: -2px; display: flex; align-items: center; gap: 8px; }
.auto-main-tab:hover { color: var(--gray-600); }
.auto-main-tab--active { color: var(--primary); border-bottom-color: var(--primary); }
.auto-main-tab i { font-size: 0.82rem; }

/* History Indicators */
.auto-hist-indicators { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.auto-hist-ind { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--gray-100); border-radius: 10px; padding: 14px 16px; }
.auto-hist-ind-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.auto-hist-ind-body { display: flex; flex-direction: column; }
.auto-hist-ind-value { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.auto-hist-ind-label { font-size: 0.7rem; font-weight: 500; color: var(--gray-400); margin-top: 2px; }

/* History Filters */
.auto-hist-filters { background: var(--white); border: 1px solid var(--gray-100); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.auto-hist-filter-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.auto-hist-filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 140px; flex: 1; }
.auto-hist-filter-group label { font-size: 0.72rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.03em; }
.auto-hist-filter-group .form-control,
.auto-hist-filter-group .form-select { font-size: 0.82rem; padding: 7px 10px; }

/* History Table */
.auto-hist-table-wrap { background: var(--white); border: 1px solid var(--gray-100); border-radius: 12px; overflow: hidden; }
.auto-hist-table { font-size: 0.82rem; }
.auto-hist-table th { background: var(--gray-50); font-size: 0.72rem; }
.auto-hist-table td { vertical-align: middle; }
.auto-hist-row--error { background: #fef2f2; }
.auto-hist-row--error:hover { background: #fee2e2 !important; }
.auto-hist-rule-name { font-weight: 600; color: var(--gray-700); font-size: 0.8rem; }
.auto-hist-summary { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; font-size: 0.78rem; }
.auto-hist-summary--error { color: var(--error); font-weight: 500; }

/* History Pagination */
.auto-hist-pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 12px; }
.auto-hist-pag-info { font-size: 0.78rem; color: var(--gray-400); }
.auto-hist-pag-btns { display: flex; gap: 4px; align-items: center; }
.auto-hist-pag-btn { width: 32px; height: 32px; border: 1px solid var(--gray-200); border-radius: 8px; background: var(--white); color: var(--gray-600); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.78rem; font-weight: 600; transition: all .15s; }
.auto-hist-pag-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-10); }
.auto-hist-pag-btn--active { background: var(--primary); color: white; border-color: var(--primary); }
.auto-hist-pag-btn--active:hover { background: var(--primary-dark); color: white; }
.auto-hist-pag-btn:disabled { opacity: .4; cursor: not-allowed; }
.auto-hist-pag-dots { color: var(--gray-400); font-size: 0.8rem; padding: 0 4px; }

@media (max-width: 1024px) {
  .auto-stats-row { grid-template-columns: repeat(3, 1fr); }
  .auto-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .auto-hist-indicators { grid-template-columns: repeat(2, 1fr); }
  .auto-hist-filter-row { flex-wrap: wrap; }
}
@media (max-width: 768px) {
  .auto-stats-row { grid-template-columns: repeat(2, 1fr); }
  .auto-grid { grid-template-columns: 1fr; }
  .auto-header { flex-direction: column; }
  .auto-days-row { gap: 4px; }
  .auto-day-check { width: 36px; height: 32px; font-size: 0.7rem; }
  .auto-hist-indicators { grid-template-columns: 1fr 1fr; }
  .auto-hist-filter-group { min-width: 100%; }
  .auto-main-tab { padding: 10px 16px; font-size: 0.82rem; }
}

/* ── Print Styles ──────────────────────────────────────────── */
@media print {
  .sidebar, .top-header, .filter-bar,
  .btn, .table-actions, .fab,
  .toast-container, .global-loading,
  .modal-overlay, #logout-btn { display: none !important; }

  .main-wrapper { width: 100%; }
  .page-content { padding: 0; overflow: visible; }
  .app-layout { display: block; }
  .app-body { height: auto; overflow: visible; }

  .card { box-shadow: none; border: 1px solid #ddd; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }

  body { background: #fff; }

  .print-section { break-inside: avoid; }

  @page { margin: 20mm; }
}

/* ── SearchSelect ───────────────────────────────────────────── */
.ss-input-wrap { position: relative; }
.ss-chevron {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); pointer-events: none; font-size: 0.75rem;
}
.ss-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  max-height: 220px; overflow-y: auto; z-index: 9999;
}
.ss-item {
  padding: 9px 14px; cursor: pointer; display: flex; flex-direction: column;
  gap: 2px; transition: background .12s;
}
.ss-item:hover, .ss-item.selected { background: var(--primary-50, #eef2ff); }
.ss-item.selected .ss-item-label { color: var(--primary); font-weight: 600; }
.ss-item-label { font-size: 0.875rem; color: var(--gray-800); }
.ss-item-sub { font-size: 0.75rem; color: var(--gray-400); }
.ss-empty { padding: 12px 14px; color: var(--gray-400); font-size: 0.875rem; text-align: center; }
.ss-item mark { background: #fef08a; border-radius: 2px; padding: 0 1px; }

/* Flatpickr overrides */
.flatpickr-calendar { font-family: var(--font-sans) !important; border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-xl) !important; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--primary) !important; border-color: var(--primary) !important; }
.flatpickr-day:hover { background: var(--primary-50, #eef2ff) !important; }
.flatpickr-input[readonly] { cursor: pointer; }

/* ── Kanban ─────────────────────────────────────────────────── */
.kanban-card {
  background: var(--white);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border: 1px solid var(--gray-100);
  transition: box-shadow var(--transition), transform var(--transition);
  user-select: none;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.kanban-card[draggable="true"] { -webkit-user-drag: element; }

.kanban-col {
  width: 260px;
  flex-shrink: 0;
  background: var(--gray-50);
  border-radius: 10px;
  padding: 0 0 8px;
  transition: background var(--transition);
}
.kanban-col.drag-over { background: rgba(99,102,241,0.06); }

.kanban-cards {
  min-height: 80px;
  padding: 0 8px;
}

/* ── Score Gauge ─────────────────────────────────────────────── */
.score-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ── Annotation Timeline ─────────────────────────────────────── */
.annotation-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-50);
}
.annotation-item:last-child { border-bottom: none; }

/* ── PDI Progress ────────────────────────────────────────────── */
.pdi-progress-bar {
  height: 6px;
  border-radius: 6px;
  background: var(--gray-100);
  overflow: hidden;
}
.pdi-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

/* ── eNPS NPS Scale ──────────────────────────────────────────── */
.nps-scale { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.nps-btn {
  width: 44px; height: 44px;
  border-radius: 8px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-600);
  transition: all .15s;
}
.nps-btn:hover { border-color: var(--primary); color: var(--primary); }
.nps-btn.selected { background: var(--primary); border-color: var(--primary); color: white; }

/* ── Career Ladder ───────────────────────────────────────────── */
.career-ladder {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.career-level-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  position: relative;
}
.career-level-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 44px;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}
.career-level-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
}
.career-level-dot.current {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(237,71,0,0.2);
}
.career-level-dot.achieved {
  background: var(--success);
  color: white;
}
.career-level-dot.future {
  background: var(--gray-100);
  color: var(--gray-400);
  border: 2px solid var(--gray-200);
}

/* ─── People Corp Brand Identity ─────────────────────────────────────────── */
.sidebar-pc-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-decoration: none;
  display: block;
  padding: 4px 0;
}
.sidebar-pc-logo span { color: #ed4700; }

.sidebar-poweredby {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}
.sidebar-poweredby strong { color: rgba(255,255,255,0.6); }

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
  margin-top: auto;
  flex-shrink: 0;
}
.app-footer-link {
  color: #ed4700;
  text-decoration: none;
  font-weight: 500;
}
.app-footer-link:hover { text-decoration: underline; }

/* ─── Hire (Contratar) Button ──────────────────────────────────────────────── */
.btn-hire {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
  letter-spacing: 0.3px;
  font-family: inherit;
}
.btn-hire:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}
.btn-hire:active { transform: translateY(0); }

/* ─── Extended Profile Form Tabs ──────────────────────────────────────────── */
.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border-color, #e5e7eb);
  margin-bottom: 24px;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.profile-tab {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted, #9ca3af);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  font-family: inherit;
}
.profile-tab.active {
  color: #ed4700;
  border-bottom-color: #ed4700;
}
.profile-tab:hover:not(.active) { color: var(--text-secondary, #374151); }

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

/* ─── Form Section Headers ────────────────────────────────────────────────── */
.form-section-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted, #9ca3af);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 768px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ─── Document Upload Area ────────────────────────────────────────────────── */
.doc-upload-area {
  border: 2px dashed var(--border-color, #e5e7eb);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.doc-upload-area:hover {
  border-color: #ed4700;
  background: rgba(237, 71, 0, 0.02);
}
.doc-upload-area .upload-icon { font-size: 2.5rem; color: var(--text-muted, #9ca3af); margin-bottom: 12px; }
.doc-upload-area .upload-text { font-size: 0.875rem; color: var(--text-muted, #9ca3af); }
.doc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--gray-50, #f9fafb);
  border-radius: 8px;
  border: 1px solid var(--border-color, #e5e7eb);
}
.doc-item-name { font-size: 0.875rem; font-weight: 500; }
.doc-item-type { font-size: 0.75rem; color: var(--text-muted, #9ca3af); }

/* ─── Plan Badge ──────────────────────────────────────────────────────────── */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-badge.bronze { background: #fef3c7; color: #92400e; }
.plan-badge.silver { background: #f1f5f9; color: #475569; }
.plan-badge.gold { background: #fef9c3; color: #854d0e; border: 1px solid #fbbf24; }

/* ─── Hire Confirmation Modal ─────────────────────────────────────────────── */
.hire-modal-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
}
.hire-modal-steps {
  background: var(--gray-50, #f9fafb);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
}
.hire-modal-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}
.hire-modal-step:not(:last-child) {
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.hire-step-num {
  width: 24px; height: 24px;
  background: #ed4700;
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Plan Settings Page ──────────────────────────────────────────────────── */
.plan-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.plan-selector-card {
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  text-align: center;
}
.plan-selector-card:hover { border-color: #ed4700; transform: translateY(-2px); }
.plan-selector-card.selected { border-color: #ed4700; background: rgba(237,71,0,0.03); }
.plan-selector-card .plan-price { font-size: 1.5rem; font-weight: 800; color: var(--text-primary, #111827); margin: 8px 0; }
.plan-selector-card .plan-price sup { font-size: 0.875rem; font-weight: 500; }
.plan-selector-card .plan-name { font-size: 1rem; font-weight: 700; color: var(--text-secondary, #374151); }

@media (max-width: 768px) {
  .plan-selector-grid { grid-template-columns: 1fr; }
  .profile-tabs { gap: 2px; }
  .profile-tab { padding: 8px 12px; font-size: 0.8rem; }
}

/* ════ Sortable Drag & Drop ════ */
.drag-handle {
  cursor: grab;
  color: var(--gray-300);
  padding: 0 6px;
  transition: color 0.15s;
}
.drag-handle:hover { color: var(--gray-500); }
.drag-handle:active { cursor: grabbing; }

.sortable-ghost {
  opacity: 0.35;
  background: var(--primary-pale, #f0f0ff) !important;
  border: 2px dashed var(--primary) !important;
  border-radius: var(--radius-md);
}

.sortable-chosen {
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
}

.sortable-drag {
  opacity: 0.95;
}

/* ════ Integration Status Pulse ════ */
@keyframes pc-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%       { opacity: 0.85; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.status-dot-active {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22c55e;
  animation: pc-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.status-dot-inactive {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
}

/* ════ Integration Log JSON viewer ════ */
.log-json-viewer {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.log-row-detail {
  background: var(--gray-50);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
}

/* ──────────────────────────────────────────────────────────
   FileDropZone — componente moderno de upload com drag-drop
   ────────────────────────────────────────────────────────── */
.fdz { width: 100%; }

.fdz-area {
  border: 2px dashed var(--gray-300, #d1d5db);
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  background: var(--gray-50, #f8fafc);
  user-select: none;
}
.fdz-area:hover { border-color: var(--primary); background: rgba(99,102,241,.03); }
.fdz-over .fdz-area {
  border-color: var(--primary);
  border-style: solid;
  background: rgba(99,102,241,.06);
  transform: scale(1.01);
}

.fdz-upload-icon {
  width: 38px; height: 38px;
  margin: 0 auto 10px;
  color: var(--gray-400, #9ca3af);
  transition: color .2s;
}
.fdz-area:hover .fdz-upload-icon,
.fdz-over .fdz-upload-icon { color: var(--primary); }
.fdz-upload-icon svg { width: 100%; height: 100%; }

.fdz-label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-600, #4b5563);
  line-height: 1.4;
}
.fdz-link { color: var(--primary); text-decoration: underline; font-weight: 600; }
.fdz-hint { font-size: .72rem; color: var(--gray-400, #9ca3af); margin-top: 5px; }

/* File selected state */
.fdz-selected {
  border: 1.5px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  padding: 10px 12px 7px;
  background: #fff;
}
.fdz-sel-inner { display: flex; align-items: center; gap: 10px; }
.fdz-sel-icon { flex-shrink: 0; width: 30px; height: 30px; color: var(--primary); }
.fdz-sel-icon svg { width: 100%; height: 100%; }
.fdz-sel-info { flex: 1; min-width: 0; }
.fdz-sel-name {
  font-size: .8125rem; font-weight: 600; color: var(--gray-700, #374151);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fdz-sel-size { font-size: .72rem; color: var(--gray-400, #9ca3af); margin-top: 1px; }

.fdz-clear-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; padding: 0; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.fdz-clear-btn:hover { background: #fee2e2; color: #ef4444; }
.fdz-clear-btn svg { width: 12px; height: 12px; }

.fdz-prog-wrap {
  height: 3px; background: var(--gray-100, #f3f4f6);
  border-radius: 2px; margin-top: 8px; overflow: hidden;
}
.fdz-prog-bar { height: 100%; border-radius: 2px; background: var(--primary); width: 0%; }
.fdz-prog-label { font-size: .68rem; color: var(--gray-400); margin-top: 3px; text-align: right; }

/* Drag-over highlight for image/logo upload areas */
.fdz-img-over { outline: 3px solid var(--primary) !important; outline-offset: 3px; }
