/* ================================================================
   Europa Laica — cssIndex.css
   Bootstrap 5.3  ·  Manual de Identidad Visual Feb 2023
   ================================================================
   Fuente única de verdad. Sin duplicados. Sin valores mágicos.
   Principio: ampliar Bootstrap, no pelearse con él.
   ================================================================ */

/* ── 1. Tokens de diseño ───────────────────────────────────────── */
:root {
  --el-purple:  #702F8A;
  --el-green:   #81C14B;
  --el-grey:    #B7B9BC;
  --el-font:    'Inter', Arial, sans-serif;
  --el-border:  #8e8e8e;
}

/* ── 2. Tipografía global ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
@import url('usuarios-form-modern.css');

body,
input, select, textarea, button,
h1, h2, h3, h4, h5, h6,
label, th, td {
  font-family: var(--el-font);
}

body {
  color: #1a1a1a;
  margin: 0;
}

/* Clases de texto legacy — hereda Inter, conserva colores originales */
[class*="texto"] { font-family: var(--el-font) !important; }

/* ── 3. Bootstrap compat ───────────────────────────────────────── */
.form-group   { margin-bottom: 1rem; }
.center-block { display: block; margin-left: auto; margin-right: auto; }

/* ── 4. Navbar ─────────────────────────────────────────────────── */
.site-navbar {
  background-color: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0.3rem 0;
}
.site-navbar .nav-link {
  color: #1a1a1a;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  letter-spacing: 0.01em;
}
.site-navbar .nav-link:hover         { color: var(--el-purple); }
.site-navbar .nav-link-cta           { color: var(--el-green); font-weight: 600; }
.site-navbar .nav-link-cta:hover     { color: #5f9e30; }
.site-navbar .nav-username           { font-size: 0.80rem; color: #555; padding: 0 0.5rem; }
.site-navbar .nav-link-logout        { color: #555; font-size: 1.15rem; padding: 0.3rem 0.6rem; line-height: 1; }
.site-navbar .nav-link-logout:hover  { color: #c0392b; }
.navbar-toggler                      { border-color: #ccc; }

/* ── 5. Layout ─────────────────────────────────────────────────── */
#cabecera  { background-color: #E9E9E9; margin: 0; }
#secciones { background-color: #1a1a1a; padding: 0 0 40px; }
#content1  { background-color: #fff; padding: 1.25rem 1.5rem 2rem; }

/* ── 6. Sidebar ────────────────────────────────────────────────── */
.sidebar-nav {
  background-color: #1a1a1a;
  border-right: 1px solid #000;
  min-height: 100%;
}
.sidebar-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.35);
  padding: 1rem 1rem 0.4rem;
  margin: 0;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.87rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.sidebar-link i { font-size: 0.9rem; opacity: 0.8; flex-shrink: 0; }
.sidebar-link:hover {
  color: var(--el-green);
  background-color: rgba(255, 255, 255, 0.06);
  border-left-color: var(--el-green);
}
.sidebar-link:hover i { opacity: 1; }
.sidebar-link.active {
  color: #fff;
  background-color: rgba(129, 193, 75, 0.12);
  border-left-color: var(--el-green);
  font-weight: 600;
}
.sidebar-link.active i { opacity: 1; }
.sidebar-link.disabled {
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  cursor: default;
  border-left-color: transparent;
}
.sidebar-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0.4rem 0.75rem;
}
/* Toggler mobile */
.sidebar-toggler {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.7rem 1rem;
  background: #1a1a1a;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.87rem;
  font-weight: 500;
  cursor: pointer;
}
.sidebar-toggler:hover { color: #fff; }
.sidebar-body { display: none; }
.sidebar-body.open { display: block; }
@media (min-width: 576px) {
  .sidebar-toggler { display: none; }
  .sidebar-body    { display: block; }
}
/* Badge NUEVO */
.badge-nuevo {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--el-green);
  color: #000;
  padding: 0.15em 0.45em;
  border-radius: 0.25rem;
  vertical-align: middle;
  margin-left: 0.3rem;
  line-height: 1.4;
}
/* Título de sección dentro del sidebar (legado) */
.textoAzul18Center {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-align: center;
}

/* ── 7. Campos de texto ────────────────────────────────────────── */
.form-control,
.form-select {
  border-color: var(--el-border);
  border-radius: 0.375rem;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--el-purple);
  box-shadow: 0 0 0 0.2rem rgba(112, 47, 138, 0.2);
}
.form-control[readonly],
.form-control:disabled {
  background-color: #f5f5f5;
  color: #6c757d;
  border-color: var(--el-grey);
}
.form-label {
  font-weight: 500;
}

/* ── 8. Radio buttons y checkboxes ─────────────────────────────── */
/*
  Bootstrap 5 usa appearance:none + SVG para pintar controles, con borde
  rgba(0,0,0,.25) casi invisible. Además, `.form-check .form-check-input`
  (especificidad 0,2,0) aplica float:left y margin-left:-1.5em.
  Solución: apariencia nativa + accent-color, y igualar especificidad
  para anular el float sin necesitar !important.
*/

/* form-check como flex: elimina el modelo float de Bootstrap */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding-left: 0;   /* Bootstrap pone 1.5em para el float; ya no lo necesitamos */
  min-height: 0;
}

/* Especificidad (0,2,0) — igual que Bootstrap — para ganar el float:left */
.form-check .form-check-input {
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: var(--el-purple);
  flex-shrink: 0;
  float: none;         /* anula Bootstrap: float:left */
  margin-left: 0;      /* anula Bootstrap: margin-left:-1.5em */
  margin-top: 0;
  width: 1em;
  height: 1em;
  cursor: pointer;
}

.form-check .form-check-label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;  /* evita que el texto se corte visualmente */
}

/* ── 9. Login ──────────────────────────────────────────────────── */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #dde0e4;
  border-radius: 0.5rem;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}
.login-title    { font-size: 1.5rem; font-weight: 600; color: #1a1a1a; margin-bottom: 0.25rem; }
.login-subtitle { font-size: 0.9rem; color: #666; margin-bottom: 1.5rem; }
.forgot-link    { font-size: 0.85rem; color: var(--el-purple); text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
.btn-login {
  display: block;
  width: 100%;
  background-color: var(--el-purple);
  border-color: var(--el-purple);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
}
.btn-login:hover { background-color: #5a2070; }
.btn-asociate {
  display: block;
  width: 100%;
  text-align: center;
  border: 1.5px solid var(--el-green);
  color: var(--el-green);
  font-weight: 600;
  padding: 0.55rem;
  border-radius: 0.375rem;
  text-decoration: none;
  background: transparent;
}
.btn-asociate:hover { background-color: var(--el-green); color: #000; }

/* ── 10. Botones generales ─────────────────────────────────────── */
.btn-primary {
  background-color: var(--el-green);
  border-color: var(--el-green);
  color: #000;
  font-weight: 500;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #6aaa38;
  border-color: #6aaa38;
  color: #000;
}

/* ── 10. Fieldsets de formulario ───────────────────────────────── */
.frm-seccion {
  border: 1px solid #dde0e4;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  background: #fff;
}
.frm-seccion legend {
  width: auto;
  padding: 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--el-purple);
  background: #fff;
}

/* ── 11. Pie de página ─────────────────────────────────────────── */
.site-footer {
  background-color: var(--el-purple);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  padding: 0.6rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.footer-links { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.footer-links a       { color: rgba(255, 255, 255, 0.85); text-decoration: none; white-space: nowrap; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-links .sep    { color: rgba(255, 255, 255, 0.4); }
.footer-copy          { color: rgba(255, 255, 255, 0.6); white-space: nowrap; }

/* ── 12. Modales del pie ───────────────────────────────────────── */
.pie-modal-body             { font-size: 0.9rem; line-height: 1.6; color: #1a1a1a; }
.pie-modal-body h6          { font-weight: 600; color: var(--el-purple); margin-top: 1.1rem; margin-bottom: 0.3rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; }
.pie-modal-body a           { color: var(--el-purple); text-decoration: none; }
.pie-modal-body a:hover     { text-decoration: underline; }
.modal-header               { border-bottom: 2px solid var(--el-purple); }
.modal-title                { font-weight: 600; color: var(--el-purple); font-size: 1rem; }

/* ── 13. Contenido principal: homogeneidad ─────────────────────── */
/* Título de página */
#content1 h2, #content1 h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--el-purple);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 1.5rem;
}
/* Miga de pan — Bootstrap 5 breadcrumb custom */
.breadcrumb {
  background: transparent;
  padding: 0.4rem 0;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}
.breadcrumb-item a {
  color: var(--el-purple);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: #555; font-weight: 400; }
.breadcrumb-item + .breadcrumb-item::before { color: #aaa; }

/* Tablas: estilar automáticamente las tablas legacy (sin clase .table) */
#content1 table:not([class]) {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
#content1 table:not([class]) th {
  background-color: var(--el-purple);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}
#content1 table:not([class]) td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  color: #333;
}
#content1 table:not([class]) tbody tr:nth-child(even) td { background-color: #fafafa; }
#content1 table:not([class]) tbody tr:hover td { background-color: #f0eef5; }

/* Tablas Bootstrap/DataTables: cabeceras centradas + rejilla global */
#content1 table thead th {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
/* Botones de acción dentro de celdas: sin margen extra */
#content1 table td .btn { margin: 1px; }

/* ── DataTables: paginación siempre visible ────────────────────── */
/* Paginación a la izquierda (bottomStart) para que sea visible
   aunque la tabla desborde horizontalmente (table-responsive). */
div.dt-container div.dt-paging .pagination {
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* Filtros de búsqueda en listados */
.filtro-socios {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem 0.75rem;
  margin-bottom: 1.5rem;
}
.filtro-socios legend,
.filtro-socios .filtro-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--el-purple);
  margin-bottom: 0.75rem;
}

/* ── 14. Página mantenimiento ──────────────────────────────────── */
.mant-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem 1rem;
}
.mant-icon { font-size: 6rem; color: var(--el-purple); opacity: 0.85; line-height: 1; }
.mant-title { font-size: 1.6rem; font-weight: 700; color: var(--el-purple); margin: 1rem 0 0.4rem; }
.mant-sub   { font-size: 1rem; color: #555; max-width: 480px; }
.mant-badge {
  display: inline-block;
  background: #fef3cd;
  border: 1px solid #ffc107;
  color: #856404;
  border-radius: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1.5rem;
}

/* ── 15. Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  #cabecera img { max-height: 60px; }
  #secciones    { padding-bottom: 0; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* ================================================================
   LEGACY — compatibilidad con vistas aún no migradas a Bootstrap 5
   Estas clases de texto heredan Inter y mantienen los colores
   originales del sistema previo. No añadir más clases aquí.
   ================================================================ */
.textoNegro9Left,  .textoNegro9Right, .textoNegro9Center { color: #404040; font-size: 9pt; }
.textoGris7Left,   .textoGris7Right,  .textoGris7Center  { color: #414141; font-size: 7pt; }
.textoAzul9Left,   .textoAzul9Right,  .textoAzul9Center  { color: #000066; font-size: 9pt; }
.textoAzulClaro9L, .textoAzulClaro9C                     { color: #3A6DAB; font-size: 9pt; }
.textoRojo9Left,   .textoRojo9Right,  .textoRojo9Center  { color: #cc0000; font-size: 9pt; }
