/* =============================================================
   styles.css — XpertMe / ShowMe Talent Dashboard
   Fuente de verdad: Figma "Industria" mobile (sincronizado 2026-03-09)
   Estructura: Variables → Reset → Layout → Sidebar →
               Topbar → Content → Components → Responsive
   ============================================================= */

/* ---------------------------------------------------------------
   1. VARIABLES — Design Tokens (Figma: Industria · mobile node 164-2830)
   Última sincronización: 2026-03-09
--------------------------------------------------------------- */
:root {
  /* ── Colores de marca ──────────────────────────────────────── */
  --color-brand: #1b4e6b;
  /* Color2 industria – Azul primario oscuro */
  --color-brand-light: #256080;
  /* Hover / variante clara */
  --color-banner: #3a69a3;
  /* Banner bienvenida / sidebar bg (mobile) */
  --color-accent: #ee9d2e;
  /* Logo orange / Color1 naranja acento */
  --color-accent-light: #f7b84b;
  /* Naranja versión clara */
  --color-success: #388e3c;
  /* Verde éxito / progreso */

  /* ── Texto ─────────────────────────────────────────────────── */
  --color-text: #161719;
  /* black – Texto principal / títulos */
  --color-text-muted: #52555a;
  /* Color2 – Números stats / textos secundarios */
  --color-text-light: #666666;
  /* contentSecondary – Labels */
  --color-text-white: #ffffff;
  /* Texto sobre fondos oscuros */

  /* ── Superficies / fondos ──────────────────────────────────── */
  --color-white: #ffffff;
  /* Fondo de página, header, cards */
  --color-card-surface: #eaf1fb;
  /* Fondo de stat cards (azul pastel) */
  --color-sidebar-bg: #f8f9fb;
  /* Sidebar background (desktop) */
  --color-body-bg: #f0f2f7;
  /* Page background general */
  --color-border: #e4e4e7;
  /* Bordes de componentes */

  /* ── Dimensiones de layout ─────────────────────────────────── */
  --sidebar-width: 224px;
  /* 14rem */
  --topbar-height: 56px;
  --mobile-max-width: 440px;
  /* Ancho máximo del container mobile (Figma) */

  /* ── Radios de borde (tokens Figma) ────────────────────────── */
  --radius-xs: 4px;
  /* Inputs, tags pequeños */
  --radius-sm: 6px;
  /* Botones, sidebar footer */
  --radius-md: 12px;
  /* Banner bienvenida, chart cards */
  --radius-lg: 15px;
  /* Stat cards */
  --radius-full: 9999px;
  /* Avatars / pills / search */

  /* ── Sombras ───────────────────────────────────────────────── */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-md: 0 2px 8px rgba(27, 78, 107, .08);
  --shadow-lg: 0 4px 16px rgba(27, 78, 107, .14);

  /* ── Transición global ─────────────────────────────────────── */
  --transition: 0.25s ease;

  /* ── Tipografía (Figma: Poppins principal, Lato/Inter fallback) ─ */
  --font-base: 'Poppins', 'Lato', 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* ---------------------------------------------------------------
   2. RESET / BASE
--------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-base);
  background-color: var(--color-body-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--color-body-bg);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ---------------------------------------------------------------
   3. LAYOUT
--------------------------------------------------------------- */
.main-wrapper {
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}

@media (min-width: 768px) {
  .main-wrapper {
    margin-left: var(--sidebar-width);
  }
}

/* ---------------------------------------------------------------
   4. SIDEBAR OVERLAY (mobile)
--------------------------------------------------------------- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 20;
  display: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-overlay.is-visible {
  display: block;
  opacity: 1;
}

/* ---------------------------------------------------------------
   5. SIDEBAR
--------------------------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--sidebar-width);
  background-color: var(--color-sidebar-bg);
  border-right: 1px solid var(--color-border);
  z-index: 30;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--transition);
}

@media (min-width: 768px) {
  .sidebar {
    transform: translateX(0);
  }
}

/* Sidebar – Header / Logo */
.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--color-brand);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-brand);
  line-height: 1;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--color-accent);
}

.sidebar__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}

.sidebar__close:hover {
  color: var(--color-text);
}

/* Sidebar – Navigation */
.sidebar__nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: background-color var(--transition), color var(--transition);
}

.nav-link:hover {
  background-color: transparent;
  /* Sin fondo / pill */
  color: var(--color-accent);
  /* Naranja en hover */
}

.nav-link.active {
  background-color: transparent;
  /* Sin fondo en active */
  color: var(--color-accent);
  /* Naranja activo */
  font-weight: 600;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
  color: var(--color-accent);
  /* Ícono naranja en hover/active */
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-light);
  transition: color var(--transition);
}

/* Sidebar – User profile wrapper (dropdown trigger) */
.sidebar__user-wrap {
  position: relative;
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color var(--transition);
}

.sidebar__user:hover {
  background-color: #f0f6ff;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

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

.user-email {
  font-size: 11px;
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chevron {
  flex-shrink: 0;
  color: var(--color-text-light);
  transition: transform var(--transition), color var(--transition);
}

.sidebar__user-wrap.is-open .user-chevron {
  transform: rotate(180deg);
  color: var(--color-accent);
}

/* ── Dropdown panel ─────────────────────────────────────────── */
/* Figma node 33-1431: 223px wide, 12px radius, shadow-lg      */
.user-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  /* Abre hacia arriba sobre el trigger */
  left: 12px;
  right: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -4px rgba(0, 0, 0, .10),
    0 10px 15px -3px rgba(0, 0, 0, .10);
  padding: 4px;
  z-index: 50;
  /* Hidden state */
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
}

.sidebar__user-wrap.is-open .user-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Dropdown items — Figma: 36px tall, 14px Inter 500, #0F172A */
.user-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  height: 36px;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-base);
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  transition: background-color var(--transition), color var(--transition);
}

.user-dropdown__item:hover {
  background-color: #f0f6ff;
  color: var(--color-brand);
}

.user-dropdown__item svg {
  flex-shrink: 0;
  color: currentColor;
}

/* Danger variant (Cerrar sesión) */
.user-dropdown__item--danger {
  color: #dc2626;
}

.user-dropdown__item--danger:hover {
  background-color: #fef2f2;
  color: #b91c1c;
}

/* Divider — Figma: 1px, margin 16px lateral, 4px vertical padding */
.user-dropdown__divider {
  height: 1px;
  background-color: #e2e8f0;
  margin: 4px 16px;
}



/* Sidebar – Footer links */
.sidebar__footer-links {
  display: flex;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid #f3f4f6;
}

.sidebar__footer-links a {
  font-size: 10px;
  color: var(--color-text-light);
  transition: color var(--transition);
}

.sidebar__footer-links a:hover {
  color: var(--color-text-muted);
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   6. TOP BAR
--------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--color-white);
  height: var(--topbar-height);
  flex-shrink: 0;
}

/* Mobile topbar */
.topbar--mobile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--color-border);
  /* Solo en mobile */
}

.topbar__hamburger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.topbar__hamburger:hover {
  color: var(--color-brand);
}

.topbar__search {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 7px 16px 7px 36px;
  font-size: 14px;
  font-family: var(--font-base);
  background-color: #f3f4f6;
  border: none;
  border-radius: var(--radius-full);
  outline: none;
  transition: box-shadow var(--transition);
}

.search-input:focus {
  box-shadow: 0 0 0 2px rgba(26, 45, 90, 0.2);
}

.topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

/* Desktop topbar */
.topbar--desktop {
  display: none;
  align-items: center;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .topbar--mobile {
    display: none;
  }

  .topbar--desktop {
    display: flex;
  }
}

.topbar__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------
   7. PAGE CONTENT
--------------------------------------------------------------- */
.page-content {
  flex: 1;
  padding: 16px;
  padding-bottom: 60px;
  /* espacio para el footer fijo */
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .page-content {
    padding: 24px;
    padding-bottom: 60px;
    gap: 20px;
  }
}

.page-title {
  font-family: 'Lato', var(--font-base);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #111827;
  /* Figma: --Content-contentPrimary */
  padding-bottom: 16px;
  /* Figma: 16px bottom padding */
}


/* ---------------------------------------------------------------
   8. WELCOME BANNER
--------------------------------------------------------------- */
.welcome-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-banner);
  /* #3a69a3 – Figma mobile banner */
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 100px;
}

.welcome-banner__left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.welcome-banner__logo-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}

.welcome-banner__avatar {
  width: 80px;
  /* height: 80px; */
  border-radius: 50%;
  border: 2px solid rgb(58 105 163);
  object-fit: cover;
  display: block;
}

.welcome-banner__subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2px;
}

.welcome-banner__name {
  font-size: 15px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.welcome-banner__brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.brand-circle {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  font-size: 18px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.brand-accent-text {
  color: var(--color-accent);
}

/* Decorative circles */
.welcome-banner__deco {
  position: absolute;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.welcome-banner__deco--1 {
  width: 112px;
  height: 112px;
  top: -24px;
  right: -24px;
}

.welcome-banner__deco--2 {
  width: 80px;
  height: 80px;
  bottom: -32px;
  right: 64px;
}

@media (min-width: 768px) {
  .welcome-banner__logo-circle {
    width: 56px;
    height: 56px;
  }

  .welcome-banner__name {
    font-size: 17px;
  }
}

/* ---------------------------------------------------------------
   9. STATS CARDS GRID
--------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.stat-card {
  background-color: #ffffff;
  /* #eaf1fb – Figma mobile */
  border: none;
  border-radius: var(--radius-lg);
  /* 15px – Figma */
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.stat-card__number {
  font-size: 36px;
  /* Figma: 36px, weight 500 */
  font-weight: 500;
  color: var(--color-text-muted);
  /* #52555a Figma */
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-card__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.stat-card__link {
  display: inline-block;
  font-size: 11px;
  color: var(--color-accent);
  margin-top: 6px;
  transition: text-decoration var(--transition);
}

.stat-card__link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   10. CHARTS GRID
--------------------------------------------------------------- */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Mobile: 1 columna */
  gap: 16px;
}

/* Tablet y desktop: siempre 3 columnas */
@media (min-width: 640px) {
  .charts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.chart-card {
  background-color: var(--color-white);
  border: 1px solid #f1f3f8;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

/* Legend – inline */
.chart-card__legend {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Legend – grid (donut) */
.chart-card__legend--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-dot--blue {
  background-color: var(--color-brand);
}

.legend-label {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Chart canvas wrapper */
.chart-card__body {
  position: relative;
  width: 100%;
  height: 220px;
}

.chart-card__body--donut {
  height: 180px;
}

@media (min-width: 768px) {
  .chart-card__body {
    height: 240px;
  }

  .chart-card__body--donut {
    height: 200px;
  }
}

/* ---------------------------------------------------------------
   11. FOOTER
--------------------------------------------------------------- */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background-color: var(--color-white);
  border-top: 1px solid var(--color-border);
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* En desktop: empieza después del sidebar para no taparlo */
@media (min-width: 768px) {
  .site-footer {
    left: var(--sidebar-width);
  }
}


/* 1. Links */
.site-footer__links {
  display: flex;
  gap: 16px;
}

.site-footer__links a {
  font-size: 11px;
  color: #000000;
  transition: color var(--transition);
}

.site-footer__links a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* 2. Powered by + Logo */
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-footer__powered {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light);
}

/* 3. Copyright */
.site-footer__copy {
  font-size: 11px;
  color: #000000;
}
.vtag.vtag--gray   { background: #e5e7eb; color: #374151; }
.vtag.vtag--green  { background: #d1fae5; color: #065f46; }
.vtag.vtag--blue   { background: #dbeafe; color: #1e3a8a; }
.vtag.vtag--yellow { background: #fef3c7; color: #92400e; }
.vtag.vtag--red    { background: #fee2e2; color: #7f1d1d; }
.tag.tag--gray {
    background-color: #e5e7eb;
    color: #374151;
}

.tag.tag--green {
    background-color: #dcfce7;
    color: #166534;
}

.tag.tag--blue {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.tag.tag--yellow {
    background-color: #fef3c7;
    color: #a16207;
}

.tag.tag--red {
    background-color: #fee2e2;
    color: #b91c1c;
}