/* ================================================================
   OBJETTIVA — Sistema de diseño corporativo
   Fuente de verdad: brand.md + objettiva-colors.css (brandbook)
   Tipografía: Volkhov (titulares) · Roboto (cuerpo e interfaz)
   Cargado globalmente desde template.xhtml y template-public.xhtml
================================================================ */

:root {
  /* --- Fuentes --- */
  --font-heading: 'Volkhov', Georgia, serif;
  --font-body: 'Roboto', system-ui, sans-serif;
  --font-size: 14px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;

  /* --- Paleta Objettiva (fuente de verdad del brandbook) --- */
  --obj-black:      #2D2926;   /* Negro Objettiva · Black C */
  --obj-red:        #CE0E2D;   /* Rojo Objettiva · 186 C */
  --obj-red-187:    #AA182C;   /* Rojo 187 · hover, apoyo */
  --obj-warm-red:   #FF4438;   /* Warm Red · alertas, gráficos */
  --obj-salmon-486: #EE907B;   /* Salmón 486 · tono cálido */
  --obj-salmon-489: #EFC2B3;   /* Salmón 489 · fondo cálido muy claro */
  --obj-gray-427:   #CFD2D3;   /* Gris 427 · bordes, separadores */
  --obj-gray-429:   #A2A9AD;   /* Gris 429 · inactivos */
  --obj-gray-431:   #5B6670;   /* Gris 431 · texto secundario */
  --obj-gray-432:   #323E48;   /* Gris 432 · fondos UI alternativos */
  --obj-white:      #FFFFFF;
  --obj-surface:    #F6F6F5;   /* Fondo de caja suave (tablas alternas, etc.) */

  /* --- Sistema de color (mapeado al brandbook) --- */
  --background:             #FFFFFF;
  --foreground:             #2D2926;
  --card:                   #FFFFFF;
  --card-foreground:        #2D2926;
  --popover:                #FFFFFF;
  --popover-foreground:     #2D2926;
  --primary:                #CE0E2D;   /* rojo: botones, acentos interactivos */
  --primary-foreground:     #FFFFFF;
  --secondary:              #F6F6F5;   /* superficie suave */
  --secondary-foreground:   #2D2926;
  --muted:                  #CFD2D3;   /* gris 427 */
  --muted-foreground:       #5B6670;   /* gris 431 */
  --accent:                 #CE0E2D;   /* rojo Objettiva — token oficial de acento */
  --accent-soft:            #EFC2B3;   /* salmón 489 — fondo cálido de apoyo */
  --accent-foreground:      #FFFFFF;
  --destructive:            #CE0E2D;
  --destructive-foreground: #FFFFFF;
  --border:                 #CFD2D3;
  --input:                  transparent;
  --input-background:       #F6F6F5;
  --switch-background:      #A2A9AD;
  --ring:                   #CE0E2D;
  --radius:                 0.5rem;

  /* --- Sidebar (negro corporativo) --- */
  --sidebar:                    #2D2926;
  --sidebar-foreground:         #FFFFFF;
  --sidebar-primary:            #CE0E2D;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent:             #323E48;
  --sidebar-accent-foreground:  #FFFFFF;
  --sidebar-border:             rgba(255, 255, 255, 0.12);
  --sidebar-ring:               #CE0E2D;

  /* --- Gráficos --- */
  --chart-1: #CE0E2D;
  --chart-2: #5B6670;
  --chart-3: #EE907B;
  --chart-4: #323E48;
  --chart-5: #AA182C;

  /* --- Color interactivo principal (marca) --- */
  --brand-primary:     #CE0E2D;   /* rojo Objettiva · 186 C */
  --brand-hover:       #AA182C;   /* rojo 187 · hover */
  --gray-assistance:   #F6F6F5;
  --text-gray:         #5B6670;
  --border-gray:       #CFD2D3;
  --editable-cell:     #F6F6F5;
  --editable-cell-hover: #EFC2B3;
}

/* ================================================================
   BASE TIPOGRÁFICA
================================================================ */

html {
  font-size: var(--font-size);
}

body {
  font-family: var(--font-body);
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--obj-black);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

/* ================================================================
   UTILIDADES DE MARCA
================================================================ */

/* Encabezado con línea roja (patrón del brandbook) */
.obj-heading-ruled {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--obj-black);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--obj-red);
  margin-bottom: 1rem;
}

/* Callout: caja con barra roja izquierda (patrón del brandbook) */
.obj-callout {
  background: var(--obj-surface);
  border-left: 4px solid var(--obj-red);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--obj-black);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0.75rem 0;
}

/* Fuente de titulares aplicada como clase utilitaria */
.font-heading {
  font-family: var(--font-heading) !important;
}

.font-body {
  font-family: var(--font-body) !important;
}
