body, button, input, select, textarea, table, th, td {
  font-family: 'BLAA', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Estilos base y contenedores */
body {
  font-family: 'BLAA', system-ui, -apple-system, sans-serif;
  margin: 30px;
  background: #f8f9fa;
  color: #202122;
  line-height: 1.5;
}

/* Fuente de la tipografía BLAA (Biblioteca Luis Ángel Arango) */

/* Extra Light (200) */
@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-ExtraLight.woff2') format('woff2'),
       url('fuentes/BLAA-ExtraLight.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-ExtraLightItalic.woff2') format('woff2'),
       url('fuentes/BLAA-ExtraLightItalic.woff') format('woff');
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

/* Light (300) */
@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-Light.woff2') format('woff2'),
       url('fuentes/BLAA-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-LightItalic.woff2') format('woff2'),
       url('fuentes/BLAA-LightItalic.woff') format('woff');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* Regular (400) */
@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-Regular.woff2') format('woff2'),
       url('fuentes/BLAA-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-Italic.woff2') format('woff2'),
       url('fuentes/BLAA-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Bold (700) */
@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-Bold.woff2') format('woff2'),
       url('fuentes/BLAA-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-BoldItalic.woff2') format('woff2'),
       url('fuentes/BLAA-BoldItalic.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Ultra Bold (800) */
@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-UltraBold.woff2') format('woff2'),
       url('fuentes/BLAA-UltraBold.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BLAA';
  src: url('fuentes/BLAA-UltraBoldItalic.woff2') format('woff2'),
       url('fuentes/BLAA-UltraBoldItalic.woff') format('woff');
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

.card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  max-width: 1000px;
  margin: auto;
}

.header-banner {
  width: 100%;
  height: 120px;
  object-fit: contain;
  object-position: center;
  background-color: #eaecf0;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Navegación y pestañas */
.nav-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid #eaecf0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.nav-tab {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  color: #54595d;
  font-weight: 600;
  font-size: 14px;
  background: #f8f9fa;
  transition: all 0.2s;
}

.nav-tab:hover {
  background: #eaecf0;
  color: #3366cc;
  text-decoration: none;
}

.nav-tab.active {
  background: #3366cc;
  color: white;
}

/* Controles y botones */
.controls {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

select, input[type="text"] {
  padding: 8px 12px;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #a2a9b1;
  background: #fff;
}

input[type="text"] {
  flex-grow: 1;
  min-width: 200px;
}

.btn-mujeres {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #dd3333;
  background: #fff;
  color: #dd3333;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-mujeres:hover { background: #fce8e6; }
.btn-mujeres.active { background: #dd3333; color: white; }

.btn-acceso {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #3366cc;
  background: #fff;
  color: #3366cc;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-acceso:hover { background: #eaf3ff; }
.btn-acceso.active { background: #3366cc; color: white; }

.btn-export {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #007a5e;
  background: #fff;
  color: #007a5e;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-export:hover { background: #d5f3ec; }

.btn-ris {
  border-color: #d93;
  color: #d93;
}
.btn-ris:hover { background: #fdf5ef; }

/* Visualizaciones y Grafos */
#graph-container {
  width: 100%;
  height: 550px;
  background-color: #ffffff;
  border-radius: 10px;
  border: 1px solid #c8ccd1;
  position: relative;
  overflow: hidden;
  margin-bottom: 15px;
}

.graph-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 1px solid #eaecf0;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.legend-item { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #202122; }
.legend-dot { width: 14px; height: 14px; display: inline-block; }
.dot-person { border-radius: 50%; background: #3366cc; }
.dot-ori { border-radius: 2px; background: #a259ff; }
.dot-gen { border-radius: 50%; background: #00af89; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); }

/* Tablas */
.table-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  border-bottom: 2px solid #eaecf0;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 10px;
}

.table-container {
  margin-top: 15px;
  overflow-x: auto;
  max-height: 550px;
  overflow-y: auto;
  border: 1px solid #eaecf0;
  border-radius: 8px;
}

table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th {
  background-color: #f8f9fa;
  padding: 12px;
  position: sticky;
  top: 0;
  border-bottom: 2px solid #c8ccd1;
  z-index: 1;
  cursor: pointer;
  user-select: none;
}
th:hover { background-color: #eaecf0; }
td { padding: 10px 12px; border-bottom: 1px solid #eaecf0; vertical-align: middle; }
tr:hover { background-color: #f8f9fa; }

a { color: #3366cc; text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

/* Badges e Imágenes */
.img-preview {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #3366cc;
  display: block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.no-img-badge {
  font-size: 11px;
  color: #72777d;
  background: #eaecf0;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  border: 2px solid #a2a9b1;
}

.badge-tag { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; margin: 2px; }
.badge-ori { background: #f3e5f5; color: #a259ff; border: 1px solid #a259ff; }
.badge-gen { background: #e0f7fa; color: #00af89; border: 1px solid #00af89; }
.badge-formato { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; background: #eaf3ff; color: #3366cc; border: 1px solid #3366cc; }
.badge-url { padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: #eaf3ff; color: #3366cc; border: 1px solid #3366cc; text-decoration: none; display: inline-block; margin-top: 4px; }

/* Detalles y Footer */
details { margin-top: 25px; background: #f8f9fa; border-radius: 6px; padding: 10px 15px; font-size: 14px; border: 1px solid #eaecf0; }
summary { cursor: pointer; font-weight: 600; color: #202122; }
pre { background: #202122; color: #f8f9fa; padding: 15px; border-radius: 6px; overflow-x: auto; font-size: 13px; margin-top: 10px; }

.btn-wqs { display: inline-block; margin-top: 10px; padding: 8px 14px; background: #3366cc; color: white; border-radius: 4px; font-size: 13px; font-weight: 500; }
.btn-wqs:hover { background: #2a4b8d; text-decoration: none; }

footer {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #eaecf0;
  text-align: center;
  font-size: 13px;
  color: #54595d;
}
footer a { font-weight: 600; }
