@import url('./theme-editor.css');
@import url('./main-layout.css');
@import url('./views/inicio-view.css');
@import url('./views/ordenesdecompra-view.css');
@import url('./views/datos-maestros-view.css');
@import url('./views/informes-view.css');
@import url('./views/login-view.css');

:root {
  /* Brand Palette - Enlaza */
  --enlaza-blue-dark: #0091d5;   /* New Corporate Blue */
  --enlaza-blue-medium: #004a99; /* Gradient middle */
  --enlaza-blue-accent: var(--enlaza-blue-dark); /* ACTION COLORS (buttons, links, headers) */
  --enlaza-blue-light: #f0f7ff;  /* Background soft blue */
  
  /* Lumo Overrides */
  --lumo-primary-color: var(--enlaza-blue-accent);
  --lumo-primary-text-color: var(--enlaza-blue-accent);
  --lumo-primary-contrast-color: #ffffff;
}

/* Final Consistency for Buttons */
vaadin-button[theme~="primary"] {
  background-color: var(--enlaza-blue-dark) !important;
  color: white !important;
}

vaadin-button:not([theme~="primary"]) {
  color: var(--enlaza-blue-dark);
}

/* Global Grid Coherence - DEFINITIVE FIX FOR DUAL-ROW HEADERS */

/* 1. Base style: All header cells are WHITE (Row 2 / Filters) */
vaadin-grid::part(header-cell) {
  background-color: #ffffff !important;
  color: var(--lumo-body-text-color) !important;
}

/* 2. Style for Row 1 (Labels): We paint it BLUE only if it DOES NOT contain a filter.
   We use the content slot as a proxy to reach the parent part if :has() is supported,
   OR we style the content itself to be blue. */
vaadin-grid::part(header-cell):not(:has(vaadin-grid-filter)) {
  background-color: var(--enlaza-blue-dark) !important;
  color: #ffffff !important;
}

/* 3. Refinement for Filter Components to ensure they are 100% visible */
vaadin-grid vaadin-grid-filter {
  background-color: white !important;
  color: var(--lumo-body-text-color) !important;
  --lumo-contrast-10pct: rgba(0, 0, 0, 0.1);
}

/* 4. Ensure no blue remains in the filter row even if :has() fails on parts */
vaadin-grid vaadin-grid-cell-content:has(vaadin-grid-filter) {
  background-color: #ffffff !important;
  color: var(--lumo-body-text-color) !important;
  display: flex;
  height: 100%;
  width: 100%;
  align-items: center;
}