/* ══════════════════════════════════════════════════════════════
   COMPETENCIASPRO 360° — DESIGN SYSTEM
   Premium HR Tech SaaS · v2.0
   ══════════════════════════════════════════════════════════════ */

/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand:          #6366F1;
  --brand-dark:     #4F46E5;
  --brand-darker:   #3730A3;
  --brand-light:    #EEF2FF;
  --brand-mid:      #C7D2FE;
  --brand-glow:     rgba(99,102,241,.25);

  --violet:         #8B5CF6;
  --pink:           #EC4899;
  --cyan:           #06B6D4;

  /* Semantic */
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --success-dark:   #059669;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;
  --info:           #3B82F6;
  --info-light:     #DBEAFE;

  /* Sidebar */
  --sb-width:       260px;
  --sb-collapsed:   68px;
  --sb-bg:          #F7F6F1;
  --sb-border:      rgba(15,23,42,.08);
  --sb-text:        #64748B;
  --sb-text-active: #0F172A;
  --sb-hover:       rgba(99,102,241,.07);
  --sb-active-bg:   rgba(99,102,241,.10);
  --sb-active-bd:   #6366F1;
  --sb-section:     #94A3B8;

  /* Layout */
  --topbar-h:       64px;
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --radius-full:    999px;

  /* Page */
  --page-bg:        #F0F2F9;
  --card-bg:        #FFFFFF;
  --border:         #E5E7EB;
  --border-focus:   #6366F1;

  /* Text */
  --text-1:         #0F172A;
  --text-2:         #475569;
  --text-3:         #94A3B8;
  --text-inv:       #FFFFFF;

  /* Shadows */
  --sh-xs:  0 1px 2px rgba(0,0,0,.05);
  --sh-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --sh-md:  0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05);
  --sh-lg:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --sh-xl:  0 20px 25px -5px rgba(0,0,0,.08), 0 10px 10px -5px rgba(0,0,0,.03);
  --sh-brand: 0 4px 14px rgba(99,102,241,.4);

  /* Timing */
  --t-fast:   .12s ease;
  --t-base:   .2s ease;
  --t-slow:   .35s cubic-bezier(.4,0,.2,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;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; outline: none; }
img { max-width: 100%; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.3; }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.25); }

/* ══════════════════════════════════════════════════════════════
   SPLASH SCREEN
═══════════════════════════════════════════════════════════════ */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0B0A16 0%, #1A1035 50%, #0D1B45 100%);
  animation: splashFadeOut .5s ease .9s forwards;
}
.splash-inner { text-align: center; }
.splash-logo-wrap {
  position: relative;
  width: 88px; height: 88px;
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
}
.splash-ring {
  position: absolute; border-radius: 50%;
  border: 2px solid transparent;
}
.splash-ring-1 {
  inset: 0;
  border-color: rgba(99,102,241,.5);
  animation: splashSpin 2s linear infinite;
}
.splash-ring-2 {
  inset: 8px;
  border-color: rgba(139,92,246,.4);
  animation: splashSpin 3s linear infinite reverse;
}
.splash-ring-3 {
  inset: 16px;
  border-color: rgba(236,72,153,.3);
  animation: splashSpin 4s linear infinite;
}
.splash-icon {
  font-size: 2rem; color: #6366F1;
  filter: drop-shadow(0 0 16px rgba(99,102,241,.8));
  animation: splashPulse 1.5s ease-in-out infinite;
}
.splash-title {
  font-size: 2rem; font-weight: 800; color: #fff;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, #fff, #a5b4fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.splash-sub { color: rgba(255,255,255,.5); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 32px; }
.splash-progress-bar {
  width: 200px; height: 3px; background: rgba(255,255,255,.1);
  border-radius: 99px; margin: 0 auto; overflow: hidden;
}
.splash-bar-fill {
  height: 100%; width: 0; background: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899);
  border-radius: 99px;
  animation: splashLoad .9s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes spin          { to { transform: rotate(360deg); } }
@keyframes splashFadeOut { to { opacity: 0; pointer-events: none; } }
@keyframes splashSpin { to { transform: rotate(360deg); } }
@keyframes splashPulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes splashLoad { to { width: 100%; } }

/* ══════════════════════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════════════════════ */
.login-screen {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #0B0A16 0%, #1a1040 60%, #0d1b45 100%);
}
.login-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .4;
}
.login-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #6366F1, transparent);
  top: -100px; left: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}
.login-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #8B5CF6, transparent);
  bottom: -50px; right: -50px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}
.login-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #EC4899, transparent);
  top: 50%; left: 40%;
  animation: orbFloat 12s ease-in-out infinite;
}
.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 50px 50px;
}
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-20px) scale(1.05); }
  66% { transform: translate(-20px,30px) scale(.95); }
}

.login-left {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 80px;
  position: relative; z-index: 1;
}
.login-promo { max-width: 500px; color: #fff; }
.login-promo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,.2); border: 1px solid rgba(99,102,241,.4);
  color: #a5b4fc; font-size: .75rem; font-weight: 600;
  padding: 6px 14px; border-radius: 99px;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 28px;
}
.login-promo-badge .material-icons-round { font-size: .9rem; }
.login-promo h1 {
  font-size: 3rem; font-weight: 800; line-height: 1.15;
  letter-spacing: -.03em; margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 40%, #a5b4fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-promo p { color: rgba(255,255,255,.6); font-size: 1.05rem; line-height: 1.7; margin-bottom: 40px; }
.login-promo-stats { display: flex; gap: 32px; align-items: center; }
.promo-stat strong { display: block; font-size: 2rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.promo-stat small { color: rgba(255,255,255,.5); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.promo-stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,.15); }

.login-right {
  width: 480px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  position: relative; z-index: 1;
}

.login-card {
  width: 100%; background: rgba(255,255,255,.97);
  border-radius: 24px; padding: 40px;
  box-shadow: 0 25px 50px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.1);
}
.login-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}
.login-brand-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,.4);
}
.login-brand-icon .material-icons-round { color: #fff; font-size: 1.4rem; }
.login-brand h2 { font-size: 1.35rem; font-weight: 700; color: var(--text-1); }
.login-brand p { font-size: .8rem; color: var(--text-3); }

/* ─── FORM ELEMENTS ─────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: .78rem; font-weight: 600;
  color: var(--text-2); margin-bottom: 7px; letter-spacing: .02em;
}
.input-wrap, .select-wrap {
  position: relative;
  display: flex; align-items: center;
}
.field-icon {
  position: absolute; left: 12px; z-index: 1;
  font-size: 1.05rem !important; color: var(--text-3);
  pointer-events: none;
}
.form-input {
  width: 100%; height: 44px;
  padding: 0 42px 0 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--text-1);
  background: var(--card-bg);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.form-input::placeholder { color: var(--text-3); }
.form-select {
  width: 100%; height: 44px;
  padding: 0 42px 0 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--text-1);
  background: var(--card-bg);
  appearance: none; cursor: pointer;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.select-arrow {
  position: absolute; right: 12px;
  font-size: 1.05rem !important; color: var(--text-3);
  pointer-events: none;
}
.pw-toggle {
  position: absolute; right: 12px;
  color: var(--text-3); padding: 4px; border-radius: 4px;
  transition: color var(--t-base);
}
.pw-toggle:hover { color: var(--brand); }
.pw-toggle .material-icons-round { font-size: 1.05rem !important; }

.login-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.check-label {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: .8rem; color: var(--text-2);
}
.check-label input { display: none; }
.check-box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg);
  transition: all var(--t-base);
}
.check-label input:checked ~ .check-box {
  background: var(--brand); border-color: var(--brand);
}
.check-label input:checked ~ .check-box::after {
  content: ''; display: block;
  width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px,-1px);
}
.link-muted { font-size: .78rem; color: var(--brand); }
.link-muted:hover { text-decoration: underline; }

.btn-login {
  width: 100%; height: 46px;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  color: #fff; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--sh-brand);
  transition: transform var(--t-base), box-shadow var(--t-base), opacity var(--t-base);
  margin-bottom: 16px;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.45); }
.btn-login:active { transform: translateY(0); }
.btn-login .material-icons-round { font-size: 1.05rem !important; }
.login-demo-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .75rem; color: var(--text-3); margin-top: 4px;
}
.login-demo-hint .material-icons-round { font-size: .85rem !important; color: var(--warning); }

/* ══════════════════════════════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════════════════════════════ */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sb-width);
  flex-shrink: 0;
  background: var(--sb-bg);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--sb-border);
  transition: width var(--t-slow);
  position: relative; z-index: 100;
  overflow: hidden;
}

/* Collapsed state */
.sidebar.collapsed { width: var(--sb-collapsed); }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .sidebar-bottom .nav-label { display: none; }
.sidebar.collapsed .collapse-btn { transform: rotate(180deg); }
.sidebar.collapsed .sidebar-user { justify-content: center; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0; height: 64px; }
.sidebar.collapsed .brand-icon { margin: 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }
.sidebar.collapsed .nav-item:hover::after {
  content: attr(data-label);
  position: absolute; left: calc(var(--sb-collapsed) + 8px); top: 50%;
  transform: translateY(-50%);
  background: #1E1B4B; color: #fff; font-size: .78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 6px; white-space: nowrap; z-index: 200;
  box-shadow: var(--sh-lg);
}

.sidebar-header {
  height: 64px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--sb-border);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(99,102,241,.4);
}
.brand-icon .material-icons-round { color: #fff; font-size: 1.1rem !important; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: .85rem; font-weight: 700; color: var(--sb-text-active); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: .7rem; color: var(--sb-section); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collapse-btn {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 7px; color: var(--sb-section);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-base);
}
.collapse-btn:hover { background: var(--sb-hover); color: var(--sb-text-active); }
.collapse-btn .material-icons-round { font-size: 1.1rem !important; transition: transform var(--t-slow); }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--sb-border);
}
.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-info span { display: block; font-size: .8rem; font-weight: 600; color: var(--sb-text-active); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info small { font-size: .68rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidenav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.sidenav::-webkit-scrollbar { width: 0; }
.nav-section-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--sb-section);
  padding: 16px 6px 6px;
  display: block;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--sb-text); font-size: .825rem; font-weight: 500;
  transition: all var(--t-base);
  margin-bottom: 2px;
  position: relative; text-decoration: none;
  white-space: nowrap;
}
.nav-item:hover { background: var(--sb-hover); color: var(--brand); text-decoration: none; }
.nav-item.active {
  background: var(--sb-active-bg);
  color: var(--sb-text-active);
  border-left: 3px solid var(--sb-active-bd);
  padding-left: 9px;
}
.nav-item.active .nav-icon { color: var(--brand); filter: drop-shadow(0 0 6px rgba(99,102,241,.6)); }
.nav-icon { font-size: 1.1rem !important; flex-shrink: 0; transition: transform var(--t-base); }
.nav-item:hover .nav-icon { transform: scale(1.1); }
.nav-label { flex: 1; }
.nav-badge {
  background: var(--brand); color: #fff;
  font-size: .62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 99px;
  flex-shrink: 0;
}

.sidebar-bottom {
  padding: 12px 10px;
  border-top: 1px solid var(--sb-border);
}
.btn-logout {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--text-2); font-size: .825rem; font-weight: 500;
  transition: all var(--t-base);
}
.btn-logout:hover { background: rgba(239,68,68,.08); color: var(--danger); }
.btn-logout .material-icons-round { font-size: 1.1rem !important; }

/* ══════════════════════════════════════════════════════════════
   MAIN WRAPPER & TOPBAR
═══════════════════════════════════════════════════════════════ */
.main-wrap {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  z-index: 50;
  box-shadow: var(--sh-xs);
}
.topbar-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.mobile-menu-btn {
  width: 36px; height: 36px; border-radius: 8px;
  color: var(--text-2);
  display: none; align-items: center; justify-content: center;
  transition: all var(--t-base);
}
.mobile-menu-btn:hover { background: var(--page-bg); color: var(--text-1); }
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600; color: var(--text-2);
}
.breadcrumb .material-icons-round { font-size: 1rem !important; color: var(--brand); }

.topbar-center { flex: 1 1 0; min-width: 0; max-width: 520px; }
.search-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--page-bg); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 0 12px; height: 38px;
  transition: all var(--t-base);
}
.search-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  background: var(--card-bg);
}
.search-icon { color: var(--text-3); font-size: 1rem !important; flex-shrink: 0; }
.search-wrap input {
  flex: 1; border: none; background: transparent;
  font-size: .82rem; color: var(--text-1);
}
.search-wrap input::placeholder { color: var(--text-3); }
.search-wrap kbd {
  font-size: .7rem; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; font-family: inherit;
  flex-shrink: 0;
}

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.company-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--brand-light); color: var(--brand-dark);
  font-size: .75rem; font-weight: 600;
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--brand-mid);
}
.company-chip .material-icons-round { font-size: .85rem !important; }
.topbar-btn {
  width: 36px; height: 36px; border-radius: 9px;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--t-base);
}
.topbar-btn:hover { background: var(--page-bg); color: var(--brand); }
.topbar-btn .material-icons-round { font-size: 1.1rem !important; }
.notif-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.topbar-dot {
  position: absolute; top: -2px; right: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--card-bg);
  pointer-events: none;
}
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px; border-radius: 9px;
  cursor: pointer; transition: background var(--t-base);
  font-size: .82rem; font-weight: 500; color: var(--text-1);
}
.topbar-user:hover { background: var(--page-bg); }
.topbar-user .material-icons-round { font-size: .9rem !important; color: var(--text-3); }

/* ══════════════════════════════════════════════════════════════
   PAGE AREA
═══════════════════════════════════════════════════════════════ */
.page-area {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 28px;
  animation: pageFadeIn .25s ease;
}
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Page Header */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-header-left h2 {
  font-size: 1.4rem; font-weight: 700;
  color: var(--text-1); letter-spacing: -.02em; margin-bottom: 4px;
}
.page-header-left p { font-size: .82rem; color: var(--text-3); }
.page-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border-radius: var(--radius-sm); font-size: .83rem; font-weight: 600;
  transition: all var(--t-base); cursor: pointer;
  white-space: nowrap; text-decoration: none !important;
  border: 1.5px solid transparent;
}
.btn .material-icons-round { font-size: 1rem !important; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--violet));
  color: #fff; border-color: transparent;
  box-shadow: 0 1px 3px rgba(99,102,241,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--sh-brand); }

.btn-secondary {
  background: var(--card-bg); color: var(--text-1);
  border-color: var(--border);
  box-shadow: var(--sh-xs);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--page-bg); color: var(--brand); }

.btn-danger {
  background: var(--danger-light); color: var(--danger);
  border-color: transparent;
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-success {
  background: var(--success-light); color: var(--success-dark);
  border-color: transparent;
}
.btn-success:hover { background: var(--success); color: #fff; }

.btn-sm { height: 32px; padding: 0 12px; font-size: .78rem; }
.btn-lg { height: 46px; padding: 0 24px; font-size: .95rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 9px; }

/* ══════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: .9rem; font-weight: 700; color: var(--text-1); }
.card-header p { font-size: .75rem; color: var(--text-3); margin-top: 2px; }
.card-body { padding: 20px 22px; }
.card-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  background: var(--page-bg);
}

/* ─── STAT CARDS ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--sh-sm);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--t-base), box-shadow var(--t-base);
  position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  right: 0; height: 3px;
}
.stat-card.purple::before { background: linear-gradient(90deg, var(--brand), var(--violet)); }
.stat-card.green::before { background: linear-gradient(90deg, var(--success), #34D399); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--info), #60A5FA); }
.stat-card.pink::before { background: linear-gradient(90deg, var(--pink), #F472B6); }

.stat-card-top { display: flex; align-items: center; justify-content: space-between; }
.stat-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon.purple { background: var(--brand-light); color: var(--brand); }
.stat-card-icon.green { background: var(--success-light); color: var(--success); }
.stat-card-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-card-icon.blue { background: var(--info-light); color: var(--info); }
.stat-card-icon.pink { background: #FCE7F3; color: var(--pink); }
.stat-card-icon .material-icons-round { font-size: 1.2rem !important; }
.stat-card-value { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: var(--text-1); }
.stat-card-label { font-size: .78rem; color: var(--text-3); font-weight: 500; margin-bottom: 4px; }
.stat-card-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .72rem; font-weight: 600;
  padding: 3px 8px; border-radius: 99px;
}
.stat-card-trend.up { background: var(--success-light); color: var(--success-dark); }
.stat-card-trend.down { background: var(--danger-light); color: var(--danger); }
.stat-card-trend.neutral { background: var(--warning-light); color: #B45309; }
.stat-card-trend .material-icons-round { font-size: .7rem !important; }

/* ─── CHART GRID ─────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.charts-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
  padding: 20px 22px;
}
.chart-card.span-2 { grid-column: span 2; }
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.chart-title { font-size: .88rem; font-weight: 700; color: var(--text-1); }
.chart-subtitle { font-size: .72rem; color: var(--text-3); margin-top: 2px; }
.chart-wrap { position: relative; height: 240px; }
.chart-wrap.tall { height: 300px; }
.chart-wrap.short { height: 180px; }

/* ══════════════════════════════════════════════════════════════
   BADGES & TAGS
═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  letter-spacing: .02em;
}
.badge .material-icons-round { font-size: .7rem !important; }
.badge-active, .badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-completed { background: var(--brand-light); color: var(--brand-dark); }
.badge-draft { background: var(--page-bg); color: var(--text-2); border: 1px solid var(--border); }
.badge-pending { background: var(--warning-light); color: #92400E; }
.badge-progress { background: var(--info-light); color: #1D4ED8; }
.badge-danger, .badge-cancelled { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: #1E40AF; }
.badge-violet { background: #EDE9FE; color: #5B21B6; }
.badge-orange { background: #FEF3C7; color: #92400E; }

/* ─── TAGS ───────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 500;
  padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-2); background: var(--page-bg);
}

/* ══════════════════════════════════════════════════════════════
   AVATAR
═══════════════════════════════════════════════════════════════ */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  color: #fff; font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: .03em;
  user-select: none;
}
.avatar-sm { width: 30px; height: 30px; font-size: .68rem; }
.avatar-lg { width: 52px; height: 52px; font-size: .92rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.2rem; }
.avatar.green { background: linear-gradient(135deg, var(--success), #34D399); }
.avatar.orange { background: linear-gradient(135deg, var(--warning), #FCD34D); }
.avatar.pink { background: linear-gradient(135deg, var(--pink), #F472B6); }
.avatar.blue { background: linear-gradient(135deg, var(--info), #60A5FA); }
.avatar.cyan { background: linear-gradient(135deg, var(--cyan), #22D3EE); }

/* ─── AVATAR GROUP ───────────────────────────────────────────── */
.avatar-group { display: flex; }
.avatar-group .avatar {
  border: 2px solid var(--card-bg);
  margin-left: -8px;
  font-size: .65rem; width: 30px; height: 30px;
}
.avatar-group .avatar:first-child { margin-left: 0; }
.avatar-group-count {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--page-bg); border: 2px solid var(--card-bg);
  color: var(--text-2); font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-left: -8px;
}

/* ══════════════════════════════════════════════════════════════
   PROGRESS
═══════════════════════════════════════════════════════════════ */
.progress-bar-wrap { display: flex; align-items: center; gap: 10px; }
.progress-bar {
  flex: 1; height: 6px; border-radius: 99px;
  background: var(--border); overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--violet));
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.progress-bar-fill.green { background: linear-gradient(90deg, var(--success), #34D399); }
.progress-bar-fill.orange { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.progress-bar-fill.red { background: linear-gradient(90deg, var(--danger), #F87171); }
.progress-label { font-size: .72rem; font-weight: 700; color: var(--text-2); flex-shrink: 0; min-width: 32px; text-align: right; }

/* ══════════════════════════════════════════════════════════════
   DATA TABLE
═══════════════════════════════════════════════════════════════ */
.table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.table-title { font-size: .9rem; font-weight: 700; color: var(--text-1); }
.table-subtitle { font-size: .72rem; color: var(--text-3); margin-top: 2px; }
.table-tools { display: flex; align-items: center; gap: 8px; }
.table-search-wrap {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 10px; height: 34px; background: var(--page-bg);
  transition: all var(--t-base);
}
.table-search-wrap:focus-within { border-color: var(--brand); background: var(--card-bg); }
.table-search-wrap .material-icons-round { font-size: .9rem !important; color: var(--text-3); }
.table-search-wrap input { border: none; background: transparent; font-size: .8rem; color: var(--text-1); width: 160px; }
.table-search-wrap input::placeholder { color: var(--text-3); }

table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--page-bg); }
th {
  text-align: left; padding: 11px 16px;
  font-size: .72rem; font-weight: 700; color: var(--text-3);
  letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text-1); }
th .material-icons-round { font-size: .75rem !important; vertical-align: middle; }
td {
  padding: 13px 16px;
  font-size: .83rem; color: var(--text-1);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t-fast); }
tbody tr:hover { background: rgba(99,102,241,.03); }
td .text-muted { color: var(--text-3); font-size: .75rem; }

/* ─── TABLE FOOTER ───────────────────────────────────────────── */
.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--page-bg);
  font-size: .78rem; color: var(--text-3);
  gap: 12px;
}
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 600; color: var(--text-2);
  transition: all var(--t-base); border: 1.5px solid transparent;
}
.page-btn:hover { background: var(--brand-light); color: var(--brand); }
.page-btn.active { background: var(--brand); color: #fff; }
.page-btn .material-icons-round { font-size: .9rem !important; }

/* ══════════════════════════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.filter-select {
  height: 34px; padding: 0 30px 0 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .8rem; color: var(--text-1); background: var(--card-bg);
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394A3B8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: border-color var(--t-base);
}
.filter-select:focus { border-color: var(--brand); outline: none; }

/* ── TABS ────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px;
  background: var(--page-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px;
  width: fit-content;
}
.tab-btn {
  height: 32px; padding: 0 16px; border-radius: 6px;
  font-size: .8rem; font-weight: 600; color: var(--text-2);
  transition: all var(--t-base); white-space: nowrap;
}
.tab-btn:hover { color: var(--brand); background: rgba(99,102,241,.05); }
.tab-btn.active { background: var(--card-bg); color: var(--brand); box-shadow: var(--sh-xs); }

/* ══════════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: modalFadeIn .2s ease;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.modal-container {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0,0,0,.25);
  width: 100%; max-width: 600px; max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalSlideIn .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.modal-container.wide { max-width: 820px; }
.modal-container.narrow { max-width: 420px; }
@keyframes modalSlideIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.modal-header p { font-size: .78rem; color: var(--text-3); margin-top: 2px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  color: var(--text-3); display: flex; align-items: center; justify-content: center;
  transition: all var(--t-base);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--border);
  flex-shrink: 0; background: var(--page-bg);
}

/* ── STEP INDICATOR ─────────────────────────────────────────── */
.steps-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 28px;
}
.step-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex: 1; text-align: center;
}
.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
  background: var(--border); color: var(--text-3);
  border: 2px solid var(--border);
  transition: all var(--t-base);
}
.step-item.active .step-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-item.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.step-item.done .step-dot::after { content: '✓'; }
.step-line { flex: 1; height: 2px; background: var(--border); margin-bottom: 24px; }
.step-line.done { background: var(--success); }
.step-label { font-size: .7rem; font-weight: 600; color: var(--text-3); }
.step-item.active .step-label { color: var(--brand); }

/* ══════════════════════════════════════════════════════════════
   TOASTS
═══════════════════════════════════════════════════════════════ */
.toasts-root {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  min-width: 300px; max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--sh-lg);
  display: flex; align-items: flex-start; gap: 12px;
  pointer-events: all;
  animation: toastIn .25s cubic-bezier(.4,0,.2,1);
  border-left: 4px solid var(--brand);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); height: 0; padding: 0; margin: 0; border: 0; } }
.toast-icon { font-size: 1.1rem !important; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--brand); }
.toast-content { flex: 1; }
.toast-title { font-size: .83rem; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.toast-message { font-size: .78rem; color: var(--text-2); }

/* ══════════════════════════════════════════════════════════════
   NOTIFICATION PANEL
═══════════════════════════════════════════════════════════════ */
.notif-panel {
  /* Position set dynamically by toggleNotifPanel() via getBoundingClientRect() */
  position: fixed; z-index: 200;
  width: 360px; max-width: calc(100vw - 24px); background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--sh-xl);
  overflow: hidden;
  animation: modalFadeIn .15s ease;
}
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.notif-header h4 { font-size: .9rem; font-weight: 700; }
.link-btn { font-size: .75rem; color: var(--brand); background: none; border: none; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-base); cursor: pointer;
}
.notif-item:hover { background: var(--page-bg); }
.notif-item.unread { background: var(--brand-light); }
.notif-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.notif-icon.purple { background: var(--brand-light); color: var(--brand); }
.notif-icon.green { background: var(--success-light); color: var(--success); }
.notif-icon.orange { background: var(--warning-light); color: var(--warning); }
.notif-icon .material-icons-round { font-size: 1rem !important; }
.notif-text { flex: 1; min-width: 0; }
.notif-text p { font-size: .8rem; color: var(--text-1); line-height: 1.4; }
.notif-text span { font-size: .7rem; color: var(--text-3); display: block; margin-top: 3px; }
.notif-footer { padding: 12px 18px; text-align: center; border-top: 1px solid var(--border); }
.notif-footer a { font-size: .78rem; color: var(--brand); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   COMPETENCY CARDS
═══════════════════════════════════════════════════════════════ */
.competency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.competency-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--sh-sm);
  transition: all var(--t-base);
  cursor: pointer;
  position: relative; overflow: hidden;
}
.competency-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: var(--brand-mid);
}
.competency-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--brand-light) 0%, transparent 100%);
  opacity: 0; transition: opacity var(--t-base);
}
.competency-card:hover::after { opacity: 1; }
.competency-card > * { position: relative; z-index: 1; }
.competency-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.competency-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem !important;
}
.competency-name { font-size: .9rem; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.competency-desc { font-size: .77rem; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.competency-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.competency-weight {
  display: flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 700; color: var(--brand);
}
.competency-behaviors-count { font-size: .72rem; color: var(--text-3); }

/* ══════════════════════════════════════════════════════════════
   COLLABORATOR CARDS
═══════════════════════════════════════════════════════════════ */
.collaborator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.collaborator-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--sh-sm);
  transition: all var(--t-base);
  cursor: pointer;
}
.collaborator-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-lg);
  border-color: var(--brand-mid);
}
.collaborator-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.collaborator-info h4 { font-size: .88rem; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.collaborator-info p { font-size: .75rem; color: var(--text-3); }
.collaborator-stats { display: flex; gap: 12px; }
.collaborator-stat { text-align: center; }
.collaborator-stat strong { display: block; font-size: 1.1rem; font-weight: 800; color: var(--text-1); }
.collaborator-stat small { font-size: .65rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }

/* ══════════════════════════════════════════════════════════════
   EVALUATION CARD
═══════════════════════════════════════════════════════════════ */
.eval-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--sh-sm);
  transition: all var(--t-base);
  cursor: pointer;
  margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.eval-card:hover { transform: translateY(-1px); box-shadow: var(--sh-md); border-color: var(--brand-mid); }
.eval-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.eval-card-title { font-size: .92rem; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.eval-card-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eval-card-meta-item { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--text-3); }
.eval-card-meta-item .material-icons-round { font-size: .85rem !important; }
.eval-card-progress { display: flex; flex-direction: column; gap: 6px; }
.eval-card-progress-top { display: flex; justify-content: space-between; font-size: .75rem; }
.eval-card-actions { display: flex; align-items: center; gap: 8px; }

/* ══════════════════════════════════════════════════════════════
   SCORE DISPLAY
═══════════════════════════════════════════════════════════════ */
.score-ring-wrap { display: flex; align-items: center; justify-content: center; }
.score-big {
  font-size: 3rem; font-weight: 800; letter-spacing: -.04em; color: var(--brand);
  line-height: 1;
}
.score-max { font-size: 1rem; color: var(--text-3); font-weight: 400; }

.score-bar-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.score-bar-row:last-child { border-bottom: none; }
.score-bar-label { font-size: .8rem; font-weight: 600; color: var(--text-1); min-width: 160px; }
.score-bar-sub { font-size: .7rem; color: var(--text-3); margin-top: 2px; }
.score-bar-container {
  flex: 1; height: 8px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.score-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--violet));
  transition: width .7s cubic-bezier(.4,0,.2,1);
}
.score-bar-num { font-size: .82rem; font-weight: 700; color: var(--text-1); min-width: 36px; text-align: right; }

/* ── GAP INDICATOR ───────────────────────────────────────────── */
.gap-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.gap-label { font-size: .83rem; font-weight: 600; color: var(--text-1); }
.gap-values { display: flex; align-items: center; gap: 12px; }
.gap-actual { font-size: .9rem; font-weight: 800; color: var(--text-1); }
.gap-expected { font-size: .8rem; color: var(--text-3); }
.gap-badge {
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px;
}
.gap-positive { background: var(--success-light); color: var(--success-dark); }
.gap-negative { background: var(--danger-light); color: var(--danger); }
.gap-neutral { background: var(--warning-light); color: #92400E; }

/* ══════════════════════════════════════════════════════════════
   DEVELOPMENT PLANS
═══════════════════════════════════════════════════════════════ */
.plan-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--sh-sm);
  margin-bottom: 12px;
  cursor: pointer; transition: all var(--t-base);
}
.plan-card:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.plan-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.plan-card-title { font-size: .9rem; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.plan-actions-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.plan-action-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; background: var(--page-bg);
  font-size: .8rem; color: var(--text-2);
}
.plan-action-item .material-icons-round { font-size: .9rem !important; }
.plan-action-done { color: var(--success); }
.plan-action-pending { color: var(--text-3); }

/* ══════════════════════════════════════════════════════════════
   TALENT MAP
═══════════════════════════════════════════════════════════════ */
.talent-map {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  padding: 16px; background: var(--page-bg);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.talent-quadrant {
  padding: 16px; border-radius: 10px;
  min-height: 140px; position: relative;
  cursor: default;
}
.talent-q-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 8px; display: block;
}
.talent-q-title { font-size: .85rem; font-weight: 700; margin-bottom: 10px; }
.talent-q-bg1 { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); border: 1px solid #BFDBFE; }
.talent-q-bg2 { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); border: 1px solid #C4B5FD; }
.talent-q-bg3 { background: linear-gradient(135deg, #FEF3C7, #FDE68A); border: 1px solid #FCD34D; }
.talent-q-bg4 { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); border: 1px solid #6EE7B7; }
.talent-avatars { display: flex; flex-wrap: wrap; gap: 6px; }
.talent-person {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: .65rem; color: var(--text-2); max-width: 52px; text-align: center;
}
.talent-person .avatar { width: 34px; height: 34px; font-size: .65rem; border: 2px solid rgba(255,255,255,.8); }
.talent-person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }

/* ══════════════════════════════════════════════════════════════
   COMPANIES (SUPER ADMIN)
═══════════════════════════════════════════════════════════════ */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.company-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--sh-sm);
  transition: all var(--t-base);
}
.company-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.company-logo {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; color: #fff;
  margin-bottom: 14px; flex-shrink: 0;
}
.company-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.company-card p { font-size: .78rem; color: var(--text-3); margin-bottom: 14px; }
.company-metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.company-metric { text-align: center; padding: 10px 4px; background: var(--page-bg); border-radius: 8px; }
.company-metric strong { display: block; font-size: 1.2rem; font-weight: 800; color: var(--text-1); }
.company-metric small { font-size: .65rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }

/* ══════════════════════════════════════════════════════════════
   PROFILE PAGE
═══════════════════════════════════════════════════════════════ */
.profile-header {
  background: linear-gradient(135deg, var(--brand), var(--violet));
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 24px;
  box-shadow: var(--sh-brand);
}
.profile-header .avatar { width: 80px; height: 80px; font-size: 1.5rem; border: 3px solid rgba(255,255,255,.4); }
.profile-header-info h2 { color: #fff; font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.profile-header-info p { color: rgba(255,255,255,.8); font-size: .88rem; }
.profile-header-stats { margin-left: auto; display: flex; gap: 24px; }
.profile-stat { text-align: center; }
.profile-stat strong { display: block; font-size: 1.8rem; font-weight: 800; color: #fff; }
.profile-stat small { color: rgba(255,255,255,.7); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 64px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon {
  width: 80px; height: 80px; border-radius: 20px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.empty-icon .material-icons-round { font-size: 2rem !important; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-1); }
.empty-state p { font-size: .83rem; color: var(--text-3); max-width: 320px; }

/* ══════════════════════════════════════════════════════════════
   SETTINGS
═══════════════════════════════════════════════════════════════ */
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.settings-nav {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  height: fit-content;
  position: sticky; top: 0;
  box-shadow: var(--sh-sm);
}
.settings-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  font-size: .83rem; font-weight: 500; color: var(--text-2);
  transition: all var(--t-base); cursor: pointer; text-decoration: none;
  margin-bottom: 2px;
}
.settings-nav-item:hover { background: var(--page-bg); color: var(--brand); text-decoration: none; }
.settings-nav-item.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.settings-nav-item .material-icons-round { font-size: 1rem !important; }
.settings-content { display: flex; flex-direction: column; gap: 16px; }
.settings-section {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--sh-sm); overflow: hidden;
}
.settings-section-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.settings-section-header h3 { font-size: .9rem; font-weight: 700; }
.settings-section-header p { font-size: .75rem; color: var(--text-3); margin-top: 2px; }
.settings-section-body { padding: 22px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; padding-bottom: 0; }
.settings-row-info label { font-size: .85rem; font-weight: 600; color: var(--text-1); display: block; margin-bottom: 3px; }
.settings-row-info p { font-size: .75rem; color: var(--text-3); }
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 12px;
  background: var(--border); cursor: pointer; transition: background var(--t-base);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  box-shadow: var(--sh-sm);
  transition: transform var(--t-base);
}
.toggle-switch input:checked + .toggle-slider { background: var(--brand); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.color-picker-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dot {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: transform var(--t-base);
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: var(--text-1); }

/* ══════════════════════════════════════════════════════════════
   FORM BUILDER (EVALUATION FORM)
═══════════════════════════════════════════════════════════════ */
.eval-form { max-width: 700px; }
.eval-question-card {
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; box-shadow: var(--sh-xs);
  transition: border-color var(--t-base);
}
.eval-question-card:hover { border-color: var(--brand-mid); }
.eval-question-title { font-size: .88rem; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.eval-question-desc { font-size: .77rem; color: var(--text-2); margin-bottom: 14px; line-height: 1.5; }
.likert-scale { display: flex; gap: 6px; }
.likert-option {
  flex: 1; text-align: center; padding: 10px 6px;
  border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: all var(--t-base);
}
.likert-option:hover { border-color: var(--brand); background: var(--brand-light); }
.likert-option.selected { border-color: var(--brand); background: var(--brand-light); }
.likert-option.selected .likert-num { color: var(--brand); }
.likert-num { display: block; font-size: 1.1rem; font-weight: 800; color: var(--text-1); }
.likert-label { font-size: .62rem; color: var(--text-3); display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eval-textarea {
  width: 100%; min-height: 80px; resize: vertical;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: .83rem; color: var(--text-1);
  font-family: inherit; transition: border-color var(--t-base);
}
.eval-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }

/* ══════════════════════════════════════════════════════════════
   SUMMARY ROW / INFO GRID
═══════════════════════════════════════════════════════════════ */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.info-item label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); display: block; margin-bottom: 4px; }
.info-item span { font-size: .88rem; font-weight: 600; color: var(--text-1); }

/* ══════════════════════════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════════════════════════ */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 14px; padding-bottom: 18px;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-line {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0; width: 20px;
}
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand); border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--brand);
  margin-top: 4px;
}
.timeline-connector { flex: 1; width: 2px; background: var(--border); margin-top: 4px; }
.timeline-item:last-child .timeline-connector { display: none; }
.timeline-content { flex: 1; padding-bottom: 2px; }
.timeline-title { font-size: .83rem; font-weight: 600; color: var(--text-1); }
.timeline-time { font-size: .72rem; color: var(--text-3); margin-bottom: 4px; }
.timeline-body { font-size: .78rem; color: var(--text-2); line-height: 1.5; }

/* ══════════════════════════════════════════════════════════════
   MISC UTILITIES
═══════════════════════════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-sm { font-size: .78rem; }
.text-xs { font-size: .72rem; }
.text-muted { color: var(--text-3); }
.text-secondary { color: var(--text-2); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.section-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }

/* ─── SKELETON LOADER ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 0%, rgba(229,231,235,.3) 50%, var(--border) 100%);
  background-size: 200% 100%;
  animation: skeleton .8s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skeleton { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .charts-grid { grid-template-columns: 1fr; }
  .charts-grid-3 { grid-template-columns: 1fr; }
  .chart-card.span-2 { grid-column: auto; }
}
@media (max-width: 900px) {
  :root { --sb-width: var(--sb-collapsed); }
  .sidebar .brand-text, .sidebar .sidebar-user-info, .sidebar .nav-label,
  .sidebar .nav-badge, .sidebar .nav-section-label, .sidebar .btn-logout .nav-label { display: none; }
  .sidebar .sidebar-header { justify-content: center; padding: 0; }
  .sidebar .sidebar-user { justify-content: center; }
  .sidebar .nav-item { justify-content: center; padding: 10px; }
  .sidebar .collapse-btn { display: none; }
  .topbar-center { display: none; }
  .login-left { display: none; }
  .login-right { width: 100%; padding: 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .page-area { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .charts-grid, .charts-grid-3 { grid-template-columns: 1fr; }
  .mobile-menu-btn { display: flex; }
  .sidebar { position: fixed; left: -100%; z-index: 200; transition: left var(--t-slow); }
  .sidebar.mobile-open { left: 0; }
  .app.sidebar-open::before {
    content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 199;
  }
  .company-chip { display: none; }
  .login-promo { display: none; }
  .profile-header-stats { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   ORG CHART — Árbol organizacional
═══════════════════════════════════════════════════════════════ */
.org-chart-outer {
  overflow-x: auto; overflow-y: visible;
  padding: 32px 24px 24px;
  background: var(--page-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 260px;
}

/* Root container: centers the whole tree */
.org-chart { display: flex; justify-content: center; }

/* ── UL/LI tree structure ─────────────────────────────────── */
.org-chart ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  list-style: none;
  padding: 0; margin: 0;
  position: relative;
  padding-top: 28px;        /* space above each level for the lines */
}

/* Vertical connector coming DOWN from the parent into this ul */
.org-chart ul::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 2px; height: 28px;
  background: var(--border);
}

/* Root UL has no "coming down from parent" line */
.org-chart > ul::before { display: none; }
.org-chart > ul { padding-top: 0; }

/* Each list item */
.org-chart li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 10px;
}

/* Horizontal T-bar drawn on each li:
   ::before = left half of the bar (right edge at center)
   ::after  = right half of the bar (left edge at center)        */
.org-chart ul li::before,
.org-chart ul li::after {
  content: '';
  position: absolute;
  top: 0; width: 50%; height: 28px;
  border-top: 2px solid var(--border);
}
.org-chart ul li::before { right: 50%; }
.org-chart ul li::after  { left: 50%;  }

/* First child: no left arm */
.org-chart ul li:first-child::before { border-color: transparent; }
/* Last child: no right arm */
.org-chart ul li:last-child::after   { border-color: transparent; }

/* Single child: no arms at all, no top padding */
.org-chart ul li:only-child::before,
.org-chart ul li:only-child::after  { display: none; }
.org-chart ul li:only-child { padding-top: 0; }
/* But still needs the vertical drop from ul::before on its parent */
.org-chart ul li:only-child > .org-node-wrap { padding-top: 28px; }

/* Root level li: no arms (already handled by > ul::before: none) */
.org-chart > ul > li::before,
.org-chart > ul > li::after { display: none; }

/* ── Node wrapper: contains the vertical drop line + the card ── */
.org-node-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Vertical line INSIDE each li going from the T-bar down to the card */
.org-v-drop {
  width: 2px; height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* Root li has no drop line (directly renders the card) */
.org-chart > ul > li > .org-node-wrap > .org-v-drop { display: none; }

/* Connector below the card going into children */
.org-v-connector {
  width: 2px; height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── The actual card ─────────────────────────────────────── */
.org-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--sh-sm);
  min-width: 185px; max-width: 220px;
  cursor: pointer;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
  white-space: nowrap;
  position: relative;
}
.org-card:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.org-card.is-root {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand-light), var(--card-bg));
  min-width: 210px;
}
.org-card.is-company {
  border-color: var(--brand-mid);
  background: linear-gradient(135deg, #EDE9FE, var(--card-bg));
  cursor: default;
}
.org-card.is-company:hover { transform: none; }
.org-card-info { min-width: 0; flex: 1; }
.org-card-name {
  font-size: .8rem; font-weight: 700; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; display: block;
}
.org-card-pos {
  font-size: .68rem; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; display: block;
  margin-top: 1px;
}
.org-card-area {
  font-size: .62rem; color: var(--brand); font-weight: 600;
  display: block; margin-top: 2px;
}
.org-card-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; align-self: flex-start; margin-top: 5px;
}
.org-card-dot.active { background: var(--success); }
.org-card-dot.inactive { background: var(--text-3); }

/* ── Expand/collapse toggle ─────────────────────────────── */
.org-toggle-btn {
  position: absolute; bottom: -10px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--card-bg); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  transition: all var(--t-base);
  box-shadow: var(--sh-xs);
}
.org-toggle-btn:hover { border-color: var(--brand); background: var(--brand-light); }
.org-toggle-btn .material-icons-round { font-size: .65rem !important; color: var(--text-3); }

/* ── Legend ─────────────────────────────────────────────── */
.org-legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 16px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.org-legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--text-2);
}
.org-legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
}

/* ── Import drag-zone ────────────────────────────────────── */
.import-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--page-bg);
}
.import-drop-zone:hover,
.import-drop-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}
.import-drop-zone .material-icons-round { font-size: 2.5rem !important; color: var(--text-3); display: block; margin-bottom: 8px; }
.import-drop-zone.drag-over .material-icons-round { color: var(--brand); }
.import-drop-zone p { font-size: .88rem; color: var(--text-2); margin-bottom: 4px; }
.import-drop-zone small { font-size: .75rem; color: var(--text-3); }

/* ── Import preview table ───────────────────────────────── */
.import-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden; margin-top: 12px;
}
.import-preview table { margin: 0; }
.import-preview th { font-size: .65rem; padding: 8px 10px; }
.import-preview td { font-size: .75rem; padding: 8px 10px; }
.import-preview .col-ok { color: var(--success); }
.import-preview .col-warn { color: var(--warning); }

/* ── Collaborator view toggle ────────────────────────────── */
.view-tabs {
  display: flex;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px; gap: 2px;
  width: fit-content;
  margin-bottom: 20px;
}
.view-tab {
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 6px;
  font-size: .8rem; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all var(--t-base); border: none; background: none;
}
.view-tab:hover { color: var(--brand); }
.view-tab.active { background: var(--card-bg); color: var(--brand); box-shadow: var(--sh-xs); }
.view-tab .material-icons-round { font-size: .95rem !important; }

/* ═══════════════════════════════════════════════════════════════
   MICROSOFT LOGIN & DIVIDER
═══════════════════════════════════════════════════════════════ */
.btn-microsoft {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: white;
  border: 1px solid #8c8c8c;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  height: 44px;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: #5e5e5e;
  cursor: pointer;
  transition: all var(--t-base);
  margin-bottom: 20px;
}
.btn-microsoft:hover {
  background: #f3f2f1;
  border-color: #5e5e5e;
}
.btn-microsoft svg {
  flex-shrink: 0;
}
.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.login-divider span {
  padding: 0 10px;
  color: var(--text-3);
  font-size: .8rem;
}

/* ═══════════════════════════════════════════════════════════════
   CAMPAIGNS (Fase 1)
═══════════════════════════════════════════════════════════════ */
.campaign-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 16px;
  transition: all var(--t-base);
  cursor: pointer;
}
.campaign-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--brand-mid);
}
.campaign-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.campaign-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
}
.campaign-period {
  font-size: .8rem;
  color: var(--text-3);
  margin-top: 4px;
}
.campaign-meta {
  display: flex;
  gap: 16px;
  font-size: .85rem;
  color: var(--text-2);
  margin-top: 12px;
}
.campaign-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONDENT VIEW (Mis Evaluaciones)
═══════════════════════════════════════════════════════════════ */
.my-eval-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  transition: all var(--t-base);
  cursor: pointer;
}
.my-eval-card:hover {
  border-color: var(--brand-mid);
  background: var(--brand-light);
}
.my-eval-info {
  flex: 1;
}
.my-eval-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}
.my-eval-pos {
  font-size: .8rem;
  color: var(--text-3);
}
.my-eval-relation {
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--surface-bg);
  color: var(--text-2);
  display: inline-block;
  margin-top: 6px;
}
.my-eval-action {
  flex-shrink: 0;
}

/* Likert Form */
.likert-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.likert-question {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-1);
  margin-bottom: 12px;
}
.likert-scale {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.likert-option {
  flex: 1;
  min-width: 60px;
  text-align: center;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--page-bg);
  cursor: pointer;
  transition: all .2s;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-2);
}
.likert-option:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}
.likert-option.selected {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.likert-option.na {
  background: var(--surface-bg);
  color: var(--text-3);
}
.likert-option.na.selected {
  background: var(--text-3);
  color: white;
  border-color: var(--text-3);
}
.likert-obs {
  margin-top: 12px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: .85rem;
  resize: vertical;
  min-height: 60px;
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORIES SETTINGS
═══════════════════════════════════════════════════════════════ */
.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.category-item-info {
  display: flex;
  flex-direction: column;
}
.category-item-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-1);
}
.category-item-desc {
  font-size: .75rem;
  color: var(--text-3);
}
.category-item-actions {
  display: flex;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   AI ASSISTANT PANEL
═══════════════════════════════════════════════════════════════ */
.ai-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99,102,241,.4);
  z-index: 900;
  transition: transform .2s, box-shadow .2s;
  flex-direction: column;
  gap: 0;
}
.ai-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(99,102,241,.5); }
.ai-fab .material-icons-round { font-size: 1.3rem !important; }
.ai-fab-label { font-size: .55rem; font-weight: 800; letter-spacing: .04em; margin-top: -2px; }

.ai-panel {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 380px;
  height: 520px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  z-index: 950;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  overflow: hidden;
}

.ai-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-bg);
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: .84rem;
  line-height: 1.55;
  animation: fadeInUp .2s ease;
}
.ai-msg-bot div { background: var(--surface-bg); padding: 10px 13px; border-radius: 0 10px 10px 10px; max-width: calc(100% - 36px); }
.ai-msg-user { flex-direction: row-reverse; }
.ai-msg-user div { background: var(--brand); color: #fff; padding: 10px 13px; border-radius: 10px 0 10px 10px; max-width: calc(100% - 36px); }

.ai-dots { display: flex; gap: 4px; padding: 6px 2px; }
.ai-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: bounce .8s infinite; }
.ai-dots span:nth-child(2) { animation-delay: .15s; }
.ai-dots span:nth-child(3) { animation-delay: .30s; }
@keyframes bounce { 0%,80%,100% { transform: scale(.7); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

.ai-suggestions {
  padding: 6px 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
.ai-chip {
  padding: 4px 10px;
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-mid);
  border-radius: 20px;
  font-size: .72rem;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s;
}
.ai-chip:hover { background: var(--brand-mid); }

.ai-input-row {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
