/* 🌍 Estilos generales */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e6f0fa;
    color: #333;
}
/* Centrado total del contenido principal */
html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hace que el contenedor crezca para centrar el contenido 
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}*/

.main-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Panel izquierdo: Estado */
.estado-jornada {
  flex: 1 1 300px;
  max-width: 400px;
  width: 100%;
}

/* Panel derecho: Historial */
.historial-jornada {
  flex: 1 1 500px;
  max-width: 100%;
  width: 100%;
}

/* Responsive: en pantallas pequeñas se apilan
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 10px;
  }
 */
  .estado-jornada,
  .historial-jornada {
    width: 100%;
    max-width: 100%;
  }
}

.editar-usuarios {
  width: 100%;
  max-width: 100%; /* Esto evita que quede encogido en móviles */
  min-width: 0;
  flex: 1 1 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .editar-usuarios {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
}



/* 🔷 Barra de navegación */
.navbar {
    background: linear-gradient(90deg, #004080, #007acc);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.navbar h2 {
    margin: 0;
    font-size: 22px;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 📦 Contenedor principal */
.container {
    width: 90%;
    max-width: 800px; /* antes era 450px */
    margin: 40px auto;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.menu-container {
    width: 250px;
    margin: 20px auto;
}

.boton-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin-bottom: 10px;
    font-size: 16px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.boton-menu:hover {
    background-color: #0056b3;
}

.boton-menu i {
    font-size: 18px;
}

/* 🛠️ Formularios */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input, select {
    padding: 12px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    transition: 0.3s;
}

input:focus {
    border-color: #007acc;
    outline: none;
}

/* 🔘 Botones */
button {
    background: #007acc;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

button:hover {
    background: #005f99;
    transform: scale(1.05);
}

/* 📜 Tarjetas */
.card {
    background: #f9fbfd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* 📱 Responsive */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }
}

/* 📌 Footer */
.footer {
    background: linear-gradient(90deg, #004080, #007acc);
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 40px;
}
/* === Mensajes de feedback === */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}

.alert-success {
    background-color: #d6f5d6;
    color: #226622;
    border: 1px solid #a3e6a3;
}

.alert-error {
    background-color: #ffe0e0;
    color: #aa0000;
    border: 1px solid #ffaaaa;
}

.modal-overlay-suparadmin {
    position: fixed;
    top: 0;
    left: 0;
  width: 100vw;
  height: 100vh;
    background: rgba(0,0,0,0.5);

    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-suparadmin  {
    background: white;
    padding: 20px 30px;
    border-radius: 6px;
    min-width: 300px;
    max-width: 90%;
    box-shadow: 0 0 15px rgba(0,0,0,0.25);
}

.modal-actions-suparadmin  {
 margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}


.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(0,0,0,0.25);
  text-align: center;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}



.btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
}

.btn.danger {
  background-color: #e74c3c;
  color: white;
}

.btn.cancel {
  background-color: #ddd;
  color: #333;
}

.error {
    background-color: #ff0000;
    border: 1px solid #ff0000;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    color: #d8000c;
}
.success {
    background-color: #e0ffe0;
    border: 1px solid #4CAF50;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    color: #256029;
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    .navbar h2 {
        font-size: 18px;
    }

    button, input {
        font-size: 14px;
        padding: 10px;
    }

    .footer {
        font-size: 14px;
        padding: 10px;
    }
}

/* Dashboard */
    .dashboard {
      display: flex;
      height: 100vh;
    }
.sidebar {
      width: 250px;
      background: linear-gradient(90deg, #004080, #007acc);
      color: white;
      padding: 20px;
      box-sizing: border-box;
    }

    .sidebar h3 {
      margin-top: 0;
    }

    .sidebar a {
      display: block;
      color: white;
      text-decoration: none;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .sidebar a:hover {
      background-color: #34495e;
    }

    .main-content {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
    }

    .active {
      font-weight: bold;
      background-color: #1abc9c;
    }
/* Botón toggle para móviles */
.toggle-sidebar {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  background: #004080;
  color: white;
  border: none;
  font-size: 24px;
  z-index: 1100;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Responsive sidebar: se oculta en móviles por defecto */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #2c3e50;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    padding-top: 60px; /* Deja espacio para el botón en móviles */
  }

  .toggle-sidebar {
    display: block;
  }
}


      /* === Panel de Empleado === */
.estado-jornada,
.historial-jornada {
  background: #f9fbfd;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.estado-jornada p,
.historial-jornada p {
  font-size: 16px;
  color: #333;
  margin: 10px 0;
}

.botones-jornada {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
}

.btn {
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
  color: white;
}

.btn-entrada {
  background-color: #28a745;
}

.btn-entrada:hover {
  background-color: #218838;
  transform: scale(1.05);
}

.btn-salida {
  background-color: #dc3545;
}

.btn-salida:hover {
  background-color: #c82333;
  transform: scale(1.05);
}

/* Iconos */
i.fas {
  margin-right: 6px;
  color: #007acc;
}

/* Historial */
#historial h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

#listaFichajes {
  list-style: none;
  padding-left: 0;
}

#listaFichajes li {
  background: #e6f0fa;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
}

/* Responsive ajustes */
@media (max-width: 600px) {
  .botones-jornada {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
  }
}


.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #d4edda;
  color: #155724;
  padding: 1em 1.5em;
  border-left: 5px solid #28a745;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 9999;
  animation: fadeIn 0.5s ease;
}
.custom-alert button {
  background: transparent;
  border: none;
  color: #155724;
  font-weight: bold;
  margin-left: 1em;
  cursor: pointer;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}


  table.dataTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9; /* blanco */
  }

  table.dataTable tbody tr:nth-child(even) {
    background-color: #e7f0fb; /* azul claro */
  }

  table.dataTable th,
  table.dataTable td {
    border: 1px solid #ccc !important;
    padding: 8px;
  }

  table.dataTable {
    border-collapse: collapse !important;
    width: 100%;
  }

/* Estilo uniforme para inputs y selects */
#editForm input,
#editForm select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  margin-top: 5px;
  margin-bottom: 15px;
}

/* Etiquetas separadas con margen */
#editForm label {
  display: block;
  font-weight: bold;
}

/* Contenedor de botones */
#editForm .form-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Estilos comunes */
#editForm .form-buttons,
#editHorasForm .form-buttons,
#edittjForm .form-buttons
#exportFormModal .form-buttons {
  display: flex;
  gap: 10px;
  margin-top: 1em;
}

#editForm .form-buttons button,
#editHorasForm .form-buttons button,
#edittjForm .form-buttons button,
#exportFormModal .form-buttons button {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

#guardarCambios,
#guardarCambiosHoras,
#guardarCambiosTjornada, 
#exportarHorasPdf{
  background-color: #007acc;
  color: white;
}

#guardarCambios:hover,
#guardarCambiosHoras:hover,
#guardarCambiosTjornada:hover,
#exportarHorasPdf:hover {
  background-color: #005f99;
}

#closeModal,
#closeModalHoras,
#closeModalTjornada,
#closeModalpdf {
  background-color: #ccc;
  color: #333;
}

#closeModal:hover,
#closeModalHoras:hover,
#closeModalTjornada:hover, 
#closeModalpdf:hover{
  background-color: #999;
}




#modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.3); /* oscurece ligeramente */
    z-index: 999; /* debajo del modal pero por encima del resto */
}

.modal {
    position: fixed;
    top: 100%;
    left: 100%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* encima del overlay */
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.btn-mes.active {
  background-color: #007bff !important;
  color: #fff !important;
}
.btn-mes:hover {
  background-color: #c0c0c0;
}

  #tabla-jornadas td,
  #tabla-jornadas th {
    text-align: center;
    vertical-align: middle;
  }
  


  .switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 25px;
}

.switch input { display: none; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 25px;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 19px; width: 19px;
  left: 3px; bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(23px);
}


.progress-container {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #4caf50;
    transition: width 0.4s ease;
}

.progress-bar.excedido {
    background: #d9534f !important;
}

#tiempoTranscurrido {
    font-size: 48px; /* Tamaño grande para los números */
    font-weight: bold; /* Poner los números en negrita */
    display: block; /* Para que se comporte como un bloque y se pueda centrar */
    text-align: center; /* Centrar el texto */
    margin: 10px 0; /* Espaciado alrededor */
}

p {
    text-align: center; /* Centra todo el contenido dentro del <p> */
}

#tiempoTranscurrido {
    font-size: 48px; /* Números grandes */
    font-weight: bold; /* Negrita */
    margin: 10px 0; /* Opcional, para añadir algo de espacio */
}


