/* ====== Estilos Generales ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f7f7f7;
  color: #333;
}

/* ====== Contenedores y Componentes Generales ====== */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

/* ====== Botones Generales ====== */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin: 5px 0;
  text-align: center;
}

.btn-primary {
  background: #007bff;
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-warning {
  background: #ffc107;
  color: #333;
  border: none;
}

.btn-warning:hover {
  background: #e0a800;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
  border: none;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* ====== Back Button ====== */
.back-button {
  margin: 20px 0;
  text-align: left;
}

/* ====== Filtros y Formularios ====== */
.filter-card {
  background: #e9ecef;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}

.filter-form .form-group {
  margin-bottom: 15px;
}

.filter-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.filter-form input[type="date"],
.filter-form input[type="month"],
.filter-form select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.radio-group {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* ====== Mensajes ====== */
.message,
.mensaje,
.no-data {
  text-align: center;
}

.message {
  font-weight: bold;
  color: #007bff;
  margin-bottom: 20px;
}

.mensaje {
  font-weight: bold;
  color: #28a745;
  margin-bottom: 15px;
}

.no-data {
  font-style: italic;
  color: #888;
}

/* ====== Header y Nav ====== */
header {
  background-color: #007bff;
  color: #fff;
  padding: 20px 0;
}

header h1 {
  margin: 0;
  text-align: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin-top: 10px;
}

.nav-menu li {
  margin: 0 15px;
}

.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-menu li a:hover {
  color: #cce5ff;
}

/* ====== Footer ====== */
footer {
  background-color: #f1f1f1;
  text-align: center;
  padding: 10px 0;
  margin-top: 20px;
  font-size: 0.9em;
}

footer a {
  color: #007bff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}



/* Formulario */
.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin: 5px 0;
  text-align: center;
}

.btn-primary {
  background: #007bff;
  color: #fff;
  border: none;
  width: 100%;
  font-size: 16px;
}

.btn-primary:hover {
  background: #0056b3;
}




/* ====== Formularios ====== */
.formulario,
.card {
  max-width: 500px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ====== @media print ====== */
@media print {
  @page {
      size: A4 portrait;
      margin: 2mm;
  }
  
  body {
      margin: 0;
      padding: 0;
      font-size: 7px;
      transform: scale(0.9);
      transform-origin: top left;
  }
  
  .container {
      width: 100%;
      margin: 0;
      padding: 0;
  }
  
  .print-report-info {
      display: block !important;
      text-align: center;
      margin-bottom: 10px;
      font-size: 1.2em;
      border-bottom: 1px solid #ccc;
      padding-bottom: 5px;
  }
  
  .table-responsive {
      overflow: visible !important;
  }
  
  .firmas-table,
  .empleados-table {
      width: 100% !important;
      table-layout: fixed;
      border-collapse: collapse;
  }
  
  .firmas-table th,
  .firmas-table td,
  .empleados-table th,
  .empleados-table td {
      border: 1px solid #ddd;
      padding: 1px;
      text-align: center;
      font-size: 7px;
      word-break: break-all;
      overflow-wrap: break-word;
  }
  
  .firma-img {
      max-width: 40px;
      height: auto;
  }
  
  .no-print {
      display: none !important;
  }
}

/* ====== Responsividad Móvil ====== */
@media (max-width: 768px) {
  .container {
      padding: 15px;
      margin: 10px;
  }
  
  .card {
      margin: 20px auto;
      padding: 20px;
  }
  
  .radio-group {
      flex-direction: column;
      gap: 10px;
  }
  
  .nav-menu {
      flex-direction: column;
      gap: 10px;
      align-items: center;
  }
  
  .btn {
      width: 100%;
  }
}

/* ====== Ajustes para dispositivos pequeños (e.g. iPhone 12) ====== */
@media only screen and (max-width: 390px) {
  input[type="time"][readonly] {
      -webkit-appearance: none;
      appearance: none;
      font-size: 16px;
      padding: 8px;
      pointer-events: none;
      background-color: #f0f0f0;
  }
  
  textarea[readonly] {
      font-size: 16px;
      padding: 8px;
      pointer-events: none;
      background-color: #f0f0f0;
  }
}
