/* ================================
   Variables de colores corporativos
   ================================ */
:root {
  --color-primario: #004080;       /* Azul oscuro institucional */
  --color-secundario: #0073e6;     /* Azul medio */
  --color-hover: #005bb5;          /* Azul hover */
  --color-rojo: #dc3545;           /* Rojo (acciones peligrosas) */
  --color-rojo-hover: #c9302c;     /* Rojo hover */
  --color-verde: #28a745;          /* Verde (acciones positivas) */
  --color-gris: #494947;           /* Gris corporativo */
  --color-fondo: #f5f8fb;          /* Fondo general */
}

/* ================================
   Fuente y cuerpo general
   ================================ */
body {
  font-family: 'Roboto', DejaVu Sans, sans-serif;
  background-color: var(--color-fondo);
  margin: 0;
  padding: 0;
  color: #333;
}

/* ================================
   Encabezado superior
   ================================ */
.header {
  background-color: var(--color-primario);
  color: #fff;
  padding: 15px 20px;
  text-align: left;
  position: relative;
}

.logout {
  float: right;
  font-size: 14px;
  margin: 0 10px 0 0;
  line-height: 1.5;
}

.logout a {
  color: #fff;
  text-decoration: none;
}

/* ================================
   Contenedor general
   ================================ */
.contenedor {
  width: 95%;
  max-width: 1200px;
  margin: 30px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* ================================
   Títulos
   ================================ */
h2 {
  text-align: center;
  color: var(--color-primario);
  font-weight: bold;
}

/* ================================
   Botones (Overrides Bootstrap)
   ================================ */
.btn-primary {
  background-color: var(--color-secundario);
  border: none;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-hover);
}

.btn-danger {
  background-color: var(--color-rojo);
  border: none;
}
.btn-danger:hover,
.btn-danger:focus {
  background-color: var(--color-rojo-hover);
}

.btn-success {
  background-color: var(--color-verde);
  border: none;
}
.btn-success:hover,
.btn-success:focus {
  background-color: #218838; /* verde más oscuro */
}

/* Botonera principal estilo tarjeta */
.botonera-principal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  margin: 30px 0;
}
.btn-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  height: 100px;
  background-color: var(--color-secundario);
  color: #fff;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background-color 0.3s, transform 0.2s;
}
.btn-panel i { font-size: 24px; margin-bottom: 8px; }
.btn-panel:hover {
  background-color: var(--color-hover);
  transform: scale(1.05);
}

/* ================================
   Tablas (Overrides Bootstrap)
   ================================ */
.table thead th {
  background-color: var(--color-primario);
  color: #fff;
  text-align: center;
}
.table tbody td {
  text-align: center;
  vertical-align: middle;
}

/* ================================
   Imagen del asistente
   ================================ */
.info img {
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* ================================
   Footer
   ================================ */
.footer {
  text-align: center;
  margin-top: 30px;
}
.footer p {
  margin-bottom: 10px;
  font-size: 14px;
  color: #333;
}

/* ================================
   Botones outline (personalizados)
   ================================ */
.btn-outline-primary {
  color: var(--color-primario);
  border-color: var(--color-primario);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--color-primario);
  color: #fff;
  border-color: var(--color-primario);
}

.btn-outline-success {
  color: var(--color-verde);
  border-color: var(--color-verde);
}
.btn-outline-success:hover,
.btn-outline-success:focus {
  background-color: var(--color-verde);
  color: #fff;
  border-color: var(--color-verde);
}

/* ================================
   Tablas tipo tarjeta en móvil
   ================================ */
@media (max-width: 576px) {
  .table thead {
    display: none; /* oculta encabezados */
  }
  .table, .table tbody, .table tr, .table td {
    display: block;
    width: 100%;
  }
  .table tr {
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  .table td {
    text-align: left !important;
    padding: 8px 8px 8px 40%;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
  }
  .table td:last-child {
    border-bottom: none;
  }
  .table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 8px;
    font-weight: bold;
    color: var(--color-primario);
  }
}

/* ================================
   Ajustes responsivos para móviles
   ================================ */
@media (max-width: 767px) {
  /* Centrar foto */
  .card-body .text-center img {
    display: block;
    margin: 0 auto;
  }

  /* Botones full width en móvil */
  .card-body .btn {
    width: 100%;
    margin-bottom: 6px;
  }

  /* Forzar columnas a apilarse */
  .card-body .row {
    flex-direction: column !important;
  }

  .card-body .col-12 {
    max-width: 100%;
  }

  .card-body img.img-thumbnail {
    margin: 0 auto;
    display: block;
  }
}

/* Forzar detalle en móvil a ocupar todo el ancho */
@media (max-width: 767px) {
  tr.detalle td {
    padding: 0 !important;
  }

  td.detalle .card-body {
    display: block !important;
  }

  td.detalle .row {
    flex-direction: column !important;
  }

  td.detalle .col-12,
  td.detalle .col-md-3,
  tr.detalle .col-md-9 {
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  td.detalle img {
    margin: 0 auto 15px auto;
    display: block;
  }

  td.detalle .btn {
    width: 100%;
    margin-bottom: 6px;
  }
}

/* ================================
   Modal Bootstrap personalizado
   ================================ */
.modal-content {
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: slideDown 0.3s ease-out;
}

.modal-header {
  background-color: var(--color-primario);
  color: #fff;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
}

/* Animación */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


:root {
  --color-auxiliares: #007bff;   /* Azul */
  --color-ganadores: #28a745;    /* Verde */
  --color-pastores: #6f42c1;     /* Morado */
  --color-rutas: #fd7e14;        /* Naranja */
  --color-bd: #dc3545;           /* Rojo */
}

body {
  font-family: 'Roboto', sans-serif;
  background: #f8f9fa;
}

.botonera-principal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
}

.btn-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 25px 15px;
  font-size: 1.05rem;
  font-weight: bold;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  min-height: 120px;

  /* 🔑 Para que el texto se ajuste */
  white-space: normal;   /* permite salto de línea */
  text-align: center;    /* centra el texto */
  word-wrap: break-word; /* corta palabras largas si es necesario */
}

.btn-panel span {
  display: block;
  margin-top: 8px;
  line-height: 1.2;
}


/* Hover */
.btn-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  text-decoration: none;
  color: #fff;
}

/* Colores por sección */
.btn-panel.auxiliares {
  background-color: var(--color-auxiliares);
}
.btn-panel.auxiliares:hover {
  background-color: #0056b3;
}

.btn-panel.ganadores {
  background-color: var(--color-ganadores);
}
.btn-panel.ganadores:hover {
  background-color: #1e7e34;
}

.btn-panel.pastores {
  background-color: var(--color-pastores);
}
.btn-panel.pastores:hover {
  background-color: #563d7c;
}

.btn-panel.rutas {
  background-color: var(--color-rutas);
}
.btn-panel.rutas:hover {
  background-color: #e8590c;
}

.btn-panel.bd {
  background-color: var(--color-bd);
}
.btn-panel.bd:hover {
  background-color: #b21f2d;
}

