/*
 * TimeBit Design System — Tokens
 * Paleta: Antracita + Índigo
 * Fondo: #f0f2f5
 * Versión: 1.1 · 2026-08-03 — chrome claro estilo Sesame HR (sidebar + topbar)
 *
 * CÓMO USAR:
 *   En cualquier CSS de la app: var(--tb-primary), var(--tb-bg-app), etc.
 *   Todos los CSS específicos de pantalla deben usar estos tokens
 *   en lugar de valores hexadecimales directos.
 */

:root {

  /* ── Colores de marca ── */
  --tb-dark:        #1f2937;   /* antracita oscuro — cabeceras, navs */
  --tb-dark-mid:    #374151;   /* antracita medio — hover de cabeceras */
  --tb-dark-light:  #4b5563;   /* antracita claro — textos sobre blanco */

  --tb-primary:     #6366f1;   /* índigo — botón principal, enlaces activos */
  --tb-primary-mid: #818cf8;   /* índigo medio — hover, highlights */
  --tb-primary-bg:  #e0e7ff;   /* índigo muy claro — fondos de badge, chips */

  /* ── Semáforo de estados ── */
  --tb-success:     #059669;   /* verde éxito — Aprobar, Activo, Entrada */
  --tb-success-bg:  #d1fae5;
  --tb-success-txt: #065f46;

  --tb-warning:     #d97706;   /* ámbar — Pendiente, Revisar, Alerta */
  --tb-warning-bg:  #fef3c7;
  --tb-warning-txt: #92400e;

  --tb-danger:      #e11d48;   /* rojo — Eliminar, Rechazar, Error */
  --tb-danger-bg:   #ffe4e6;
  --tb-danger-txt:  #9f1239;

  --tb-neutral:     #6b7280;   /* gris — Volver, Cancelar, inactivo */
  --tb-neutral-bg:  #f3f4f6;
  --tb-neutral-txt: #374151;

  --tb-info:        #0891b2;   /* cian — Info, detalles secundarios */
  --tb-info-bg:     #cffafe;
  --tb-info-txt:    #164e63;

  /* ── Fondos ── */
  --tb-bg-app:      #f3f4f8;   /* fondo de página en toda la app */
  --tb-bg-card:     #ffffff;   /* fondo de tarjeta / panel */
  --tb-bg-sidebar:  #ffffff;   /* sidebar — claro estilo Sesame (antes oscuro #1f2937) */

  /* ── Tipografía ── */
  --tb-font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --tb-text-primary:   #111827;  /* títulos, texto principal */
  --tb-text-secondary: #6b7280;  /* subtítulos, ayudas, fechas */
  --tb-text-muted:     #9ca3af;  /* texto deshabilitado, placeholder */
  --tb-text-on-dark:   #ffffff;  /* texto sobre fondos oscuros */

  --tb-font-xl:    1.75rem;   /* título de página */
  --tb-font-lg:    1.25rem;   /* subtítulo de sección */
  --tb-font-section: 1.0625rem; /* heading de tarjeta/sección (~17px) */
  --tb-font-md:    1rem;      /* texto estándar */
  --tb-font-body:  0.8125rem; /* texto de tabla, labels (~13px) */
  --tb-font-sm:    0.875rem;  /* texto secundario (~14px) */
  --tb-font-xs:    0.75rem;   /* etiquetas, badges, breadcrumb (~12px) */

  --tb-weight-normal:  400;
  --tb-weight-medium:  600;
  --tb-weight-bold:    700;
  --tb-weight-black:   800;

  /* ── Espaciado ── */
  --tb-space-xs:   4px;
  --tb-space-sm:   8px;
  --tb-space-md:   16px;
  --tb-space-lg:   24px;
  --tb-space-xl:   32px;
  --tb-space-xxl:  48px;

  /* ── Bordes y sombras ── */
  --tb-radius-sm:   8px;
  --tb-radius-md:   12px;
  --tb-radius-lg:   16px;
  --tb-radius-pill: 9999px;

  --tb-shadow-sm:   0 1px 4px rgba(15, 23, 42, .06);
  --tb-shadow-md:   0 6px 20px rgba(15, 23, 42, .08);
  --tb-shadow-lg:   0 16px 40px rgba(2, 6, 23, .18);
  --tb-shadow-card: 0 6px 20px rgba(15, 23, 42, .07);

  --tb-border-color: #dbe3ee;
  --tb-border:       1px solid #dbe3ee;

  /* ── Formularios ── */
  --tb-form-height: 36px;
  --tb-form-min-height-textarea: 64px;
  --tb-form-padding-y: 7px;
  --tb-form-padding-x: 12px;
  --tb-form-radius: 14px;

  --tb-form-label-font-size: var(--tb-font-xs);
  --tb-form-label-weight: var(--tb-weight-medium);
  --tb-form-label-color: var(--tb-text-secondary);
  --tb-form-label-gap: 3px;

  --tb-form-border-color: #dbe3ee;
  --tb-form-border-color-hover: #c7d2e2;
  --tb-form-border-color-focus: var(--tb-primary);
  --tb-form-bg: var(--tb-bg-card);
  --tb-form-bg-disabled: #f3f4f6;
  --tb-form-text-disabled: #9ca3af;
  --tb-form-placeholder: #9ca3af;

  --tb-form-focus-ring-size: 2px;
  --tb-form-focus-ring-color: rgba(99, 102, 241, .18);
  --tb-form-group-gap: 8px;

  /* ── Transiciones ── */
  --tb-transition: all .18s ease;

  /* ── Dark Surface Tokens (usados por componentes dark, ej: empleado_panel_v2) ── */
  --tb-dark-bg:           #0f172a;           /* fondo de página dark */
  --tb-dark-surface:      rgba(30, 41, 59, 0.92);   /* tarjeta dark */
  --tb-dark-surface-2:    rgba(15, 23, 42, 0.65);   /* tarjeta inner / nested */
  --tb-dark-border:       rgba(148, 163, 184, 0.12); /* borde sutil dark */
  --tb-dark-border-hover: rgba(148, 163, 184, 0.28); /* borde al hover dark */
  --tb-dark-text:         #f1f5f9;           /* texto principal dark */
  --tb-dark-text-muted:   #94a3b8;           /* texto secundario dark */
  --tb-dark-text-subtle:  #64748b;           /* texto muy apagado dark */

  /* ── Shell: sidebar + topbar (claro, estilo Sesame HR) ── */
  --tb-sidebar-width:            240px;  /* sidebar expandido */
  --tb-sidebar-width-collapsed:  64px;   /* sidebar colapsado (solo iconos) */
  --tb-sidebar-border:           #e5e7eb;
  --tb-sidebar-text:             #4b5563;   /* link inactivo */
  --tb-sidebar-text-muted:       #9ca3af;   /* kicker / group title */
  --tb-sidebar-text-active:      var(--tb-primary);   /* link activo — índigo */
  --tb-sidebar-active-bg:        var(--tb-primary-bg); /* fondo "pill" del link activo */
  --tb-sidebar-hover-bg:         #f3f4f6;

  --tb-topbar-height: 56px;
  --tb-topbar-bg:     #ffffff;
  --tb-topbar-border: #e5e7eb;
}
