/* --- Reset básico y fuentes --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body{
    margin:0;
    padding:0;
    font-family: Arial, sans-serif;

    background-image:url('../img/fondo.jpg') !important;
    background-size:cover !important;
    background-position:center center !important;
    background-repeat:no-repeat !important;
    background-attachment:fixed !important;

    min-height:100vh;
}

/* --- Header --- */
header {
  background-color: rgb(54, 95, 145);
  color: white;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

header .logo {
  height: 60px;
  margin-right: 15px;
  flex-shrink: 0;
}

header .welcome-text {
  flex-grow: 1;
}

header h1 {
  font-weight: 600;
  font-size: 1.5rem;
}

header p {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* --- Navegación --- */
nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

nav a {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  color: rgb(184, 180, 180);
  transition: background 0.3s ease;
  white-space: nowrap;
}

nav a:hover,
nav a:focus {
  background: rgb(202, 201, 201);
  color: #1a73e8;
  outline: none;
  box-shadow: 0 0 5px #1a73e8;
}

/* --- Main --- */
main {
  flex-grow: 1;
  max-width: 1100px;
  margin: 30px auto;
  padding: 20px;
}

/* --- Formularios --- */
form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #555;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"],
form input[type="time"],
form select,
form textarea {
  width: 100%;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1.8px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
  resize: vertical;
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: #1a73e8;
  outline: none;
}

/* --- Botones principales --- */
form button,
.button-link {
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 12px 28px;
  font-size: 1rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  user-select: none;
}

form button:hover,
.button-link:hover,
form button:focus,
.button-link:focus {
  background-color: #155ab6;
  outline: none;
}

/* --- Botones de acción editar/eliminar --- */
.action-button {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  color: white;
  margin-right: 5px;
  transition: background-color 0.2s ease;
}

.action-button.edit {
  background-color: #4caf50;
}

.action-button.edit:hover {
  background-color: #388e3c;
}

.action-button.delete {
  background-color: #f44336;
}

.action-button.delete:hover {
  background-color: #c62828;
}

/* --- Tablas --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 25px;
}

table th,
table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

table th {
  background-color: #365f91;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

table tbody tr:hover {
  background-color: #f0f5ff;
}

/* --- Mensajes de error y éxito --- */
.error {
  background-color: #ffe0e0;
  border-left: 5px solid #f44336;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 6px;
  color: #b00020;
  font-weight: 600;
}

.exito {
  background-color: #dbf0d5;
  border-left: 5px solid #4caf50;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 6px;
  color: #2e7d32;
  font-weight: 600;
}

/* --- Listas de alertas --- */
.alertas {
  list-style-type: none;
  padding-left: 0;
  margin-top: 10px;
}

.alertas li {
  padding: 15px 20px;
  margin-bottom: 12px;
  background-color: #fff3cd;
  border-left: 6px solid #ffca28;
  border-radius: 8px;
  font-weight: 600;
  color: #856404;
}

/* --- Footer --- */
footer {
  background-color: rgb(54, 95, 145);
  color: white;
  text-align: center;
  padding: 15px 0;
  font-size: 0.9rem;
  margin-top: auto;
  user-select: none;
}

/* --- Responsive --- */
@media (max-width: 650px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
  }

  nav a {
    display: block;
    margin-bottom: 8px;
  }
}

.fullwidth-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 30px 50px;
    background: white;
}

.acciones-superior {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.button-link {
    padding: 8px 14px;
    background: #365f91;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
}

.button-link:hover { opacity: 0.85; }

.button-link.danger {
    background: #d9534f;
}

.small-btn {
    background: #777;
}

.tabla-contenedor {
    overflow-x: auto;
}

.tabla-estilo {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tabla-estilo thead tr {
    background: #365f91;
    color: white;
}

.tabla-estilo th, .tabla-estilo td {
    padding: 8px;
    border: 1px solid #ccc;
}

.action-button {
    text-decoration: none;
    font-size: 1.2rem;
    margin-right: 5px;
}

.action-button.edit { color: #2a6; }
.action-button.delete { color: #c33; }

.estado.finalizado {
    color: red;
    font-weight: bold;
}

.estado.agendada {
    color: green;
    font-weight: bold;
}

.alert.success {
    background: #d4f8d4;
    padding: 10px;
    border-left: 5px solid green;
    margin-bottom: 15px;
}
.btn-danger {
    background-color: #c0392b;
    color: #fff;
}

.btn-danger:hover {
    background-color: #a93226;
}

.estado {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
}

.estado.agendada {
    background: #365f91;
}

.estado.en-curso {
    background: #e68a00;
}

.estado.terminada {
    background: #1a7f37;
}
.grid-reportes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px,1fr));
    gap: 20px;
}
/* CONTENEDOR GENERAL DE REPORTES */
.contenido-reportes {
    min-height: calc(100vh - 220px); /* ajusta header + footer */
    padding: 30px 40px;
    box-sizing: border-box;
}

/* TARJETAS */
.card {
    margin-bottom: 40px;
}

/* CANVAS */
canvas {
    display: block;
    max-width: 100%;
}

/* FOOTER */
footer {
    margin-top: 40px;
}
.paginacion {
    margin: 20px 0;
    text-align: center;
    font-size: 20px;
}

.paginacion a {
    text-decoration: none;
    padding: 6px 12px;
}

.paginacion span {
    margin: 0 10px;
}
/* ===== SELECCIÓN DE CONSEJOS ===== */

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.card-opcion {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-opcion:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.card-opcion .icon {
    font-size: 45px;
    margin-bottom: 10px;
}

/* COLORES */
.card-opcion.nna {
    border-top: 6px solid #4CAF50;
}

.card-opcion.jovenes {
    border-top: 6px solid #2196F3;
}

.card-opcion.adulto {
    border-top: 6px solid #FF9800;
}

.card-opcion.admin {
    background: #ffecec;
    border-top: 6px solid #d9534f;
}

.card-opcion h3 {
    margin: 0;
    font-size: 18px;
}
.btn {
    padding: 12px 22px;
    background: #365f91;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background: #2c4f7a;
}
.card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* efecto hover más pro */
.card-opcion:hover .card-img {
    transform: scale(1.05);
    transition: 0.3s;
}
/* CARD AVISO */
.aviso {
    max-width: 750px;
    margin: auto;
    text-align: center;
    padding: 35px;
}

/* ICONO */
.aviso-icono {
    font-size: 50px;
    margin-bottom: 15px;
}

/* TEXTO */
.aviso p {
    margin-bottom: 12px;
    color: #555;
}

/* CAJA DESTACADA */
.aviso-box {
    background: #c5c9ce;
    border-left: 5px solid #1a73e8;
    padding: 12px;
    margin: 20px 0;
    border-radius: 6px;
    font-weight: 600;
}

/* BOTÓN PRINCIPAL */
.btn-principal {
    background: #365f91;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    display: inline-block;
    margin-top: 15px;
}

.btn-principal:hover {
    background: #2c4d77;
}
.aviso {
    background: linear-gradient(135deg, #ffffff, #f0f6ff);
}
/* CONTENEDOR CHECK */
.check-container {
    display: block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 15px;
    text-align: left;
    user-select: none;
}

/* OCULTAR CHECK NATIVO */
.check-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* CUADRADO */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #bbb6b6;
    border-radius: 5px;
    transition: 0.3s;
}

/* HOVER */
.check-container:hover input ~ .checkmark {
    background-color: #aca7a7;
}

/* CUANDO ESTÁ ACTIVO */
.check-container input:checked ~ .checkmark {
    background-color: #365f91;
}

/* CHECK (✔) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* MOSTRAR ✔ */
.check-container input:checked ~ .checkmark:after {
    display: block;
}

/* ESTILO ✔ */
.check-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid rgb(197, 189, 189);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.grid-reportes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
    gap: 20px;
    margin-top: 30px;
}

.grid-reportes .card {
    background: white;
    padding: 20px;
    border-radius: 12px;
}
.button-link {
    display: inline-block;
    padding: 6px 10px;
    background: #365f91;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.button-link:hover {
    background: #2c4d73;
}
.dashboard-btn-container {
    display: flex;
    flex-wrap: wrap;       /* permite que los botones bajen de línea si no caben */
    gap: 10px;             /* espacio uniforme entre todos los botones */
    margin-bottom: 15px;   /* espacio debajo del bloque de botones */
}

.btn-dashboard {
    /* si quieres, puedes añadir un padding extra o ajustar tamaño */
    /* padding: 8px 16px; */
}
/* Contenedor flex */
.dashboard-btn-container {
    display: flex;
    flex-wrap: wrap;          /* los botones bajan si no caben */
    gap: 10px;                /* espacio uniforme entre botones */
    margin-bottom: 15px;
    justify-content: flex-start; /* alineados a la izquierda */
}

/* Estilo base para todos los botones del dashboard */
.btn-dashboard {
    padding: 10px 18px;
    border-radius: 6px;       /* esquinas redondeadas */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out; /* transición suave */
}

/* Hover: efecto visual al pasar el mouse */
.btn-dashboard:hover {
    transform: translateY(-2px); /* leve “flotante” */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Colores específicos si quieres un hover distinto para btn-success */
.btn-success.btn-dashboard:hover {
    background-color: #28a745cc; /* un verde más brillante */
    color: #fff;
}

/* Responsive: en móviles bajan los botones al 100% */
@media (max-width: 480px) {
    .dashboard-btn-container {
        justify-content: center; /* centrado en móvil */
    }
    .btn-dashboard {
        flex: 1 1 100%; /* cada botón ocupa toda la línea */
        text-align: center;
    }
}
/* Contenedor flex */
.dashboard-btn-container {
    display: flex;
    flex-wrap: wrap;           /* permite que bajen de línea */
    gap: 15px;                 /* espacio uniforme */
    margin-bottom: 20px;
    justify-content: flex-start;
}

/* Botones tipo tarjeta */
.btn-dashboard {
    flex: 1 1 auto;            /* se ajusta al ancho disponible */
    min-width: 120px;          /* ancho mínimo */
    padding: 12px 20px;
    border-radius: 12px;
    background-color: #f0f0f0; /* gris claro */
    color: #333;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Hover efecto tarjeta flotante */
.btn-dashboard:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    background-color: #e0e0e0;
}

/* Botones “success” verdes */
.btn-success.btn-dashboard {
    background-color: #28a745;
    color: #fff;
}
.btn-success.btn-dashboard:hover {
    background-color: #218838;
}

/* Responsive: en móviles ocupan toda la línea */
@media (max-width: 480px) {
    .btn-dashboard {
        flex: 1 1 100%;
        text-align: center;
    }
}
/* Contenedor principal del formulario */
form {
    max-width: 700px; /* ancho máximo para desktop */
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
}

/* Títulos */
form h2, form h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Tarjetas internas (secciones) */
.card {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Labels */
label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Inputs y textarea */
input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
}

/* Textarea más grande */
textarea {
    min-height: 80px;
    resize: vertical;
}

/* Botones */
button[type="submit"],
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

button[type="submit"] {
    background-color: #007bff;
    color: #fff;
}

button[type="submit"]:hover {
    background-color: #0069d9;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Radios estilo inline */
input[type="radio"] {
    margin-right: 5px;
}

/* Responsive: móviles */
@media (max-width: 480px) {
    form {
        padding: 15px;
        margin: 10px;
    }

    .card {
        padding: 15px;
    }

    button[type="submit"],
    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    label {
        font-size: 14px;
    }
}
/* Contenedor principal del formulario */
form {
    max-width: 700px;
    margin: 20px auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    font-family: 'Arial', sans-serif;
    color: #333;
}

/* Títulos */
form h2 {
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
}
form h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #555;
}

/* Tarjetas internas */
.card {
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    background-color: #f6f6f6;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

/* Labels */
label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: 600;
}

/* Inputs y textarea */
input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* Focus en inputs */
input:focus, select:focus, textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
    outline: none;
}

/* Radios estilo toggle */
.radio-group {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 8px;
}
.radio-group label {
    font-weight: 500;
}
.radio-group input[type="radio"] {
    accent-color: #007bff; /* moderno y consistente */
}

/* Edad dinámica */
#edad {
    font-weight: bold;
    color: #007bff;
}

/* Botones */
button[type="submit"],
.btn {
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

button[type="submit"] {
    background-color: #007bff;
    color: #fff;
    margin-right: 10px;
}
button[type="submit"]:hover {
    background-color: #0069d9;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}
.btn-danger:hover {
    background-color: #c82333;
}

/* Responsive: móviles */
@media (max-width: 480px) {
    form {
        padding: 15px;
        margin: 10px;
    }

    .card {
        padding: 15px;
    }

    button[type="submit"],
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}


/* Cada pregunta como tarjeta */
.radio-group {
    background: #e9f0ff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Responsive: tablets y móviles */
@media (max-width: 992px) {
    .preguntas-grid { grid-template-columns: repeat(2, 1fr); } /* 2 por fila */
}
@media (max-width: 480px) {
    .preguntas-grid { grid-template-columns: 1fr; } /* 1 por fila */
}
.error {
    border: 2px solid #e74c3c !important;
    background-color: #ffecec;
}
/* =========================
   TITULOS MODULOS ADMIN
========================= */

.hero-text{
    background:rgba(0,0,0,0.35);
    padding:20px 25px;
    border-radius:16px;
    display:inline-block;
    margin-bottom:20px;
    backdrop-filter:blur(3px);
}

.title{
    margin-bottom:5px;
    color:#fff;
    font-size:38px;
    font-weight:bold;
    text-shadow:0 2px 6px rgba(0,0,0,0.4);
}

.welcome{
    margin-bottom:25px;
    color:#fff;
    font-size:18px;
    text-shadow:0 2px 6px rgba(0,0,0,0.4);
}

/* TOP BAR GENERAL */
.top-bar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
    flex-wrap:wrap;
    background:#355f98;
    padding:18px 20px;
    border-radius:14px;
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
}

.top-bar h2{
    margin:0;
    color:#fff;
    font-size:24px;
    font-weight:bold;
}
.page-title{
    color:#fff !important;
    margin-bottom:15px;
    font-size:36px;
    font-weight:bold;
}