/* report.css */

/* Estructura general */

#payrollReport {
  width: 100%;
  max-width: 1350px;
  margin: 70px auto 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-family: 'Montserrat', sans-serif;
  color: #1E2A5B;
}

/* Para pantallas grandes (mayores a 1350px), centrado */
@media (min-width: 1351px) {
  #payrollReport {
    width: 1350px;
  }
}

/* T铆tulo */
#payrollReport h2 {
  font-size: 1.6em;
  margin-bottom: 16px;
  font-family: 'Michroma', sans-serif;
  text-align: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-top: 10px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: #1E2A5B;
  margin-bottom: 4px;
}

.filter-group input[type="date"],select {
  padding: 8px 10px;
  border: 1px solid #C1CCD1;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  min-width: 160px;
}



/* Bot贸n */
.material-button {
  background-color: #FF4F00;
  color: white;
  font-size: 1em;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.material-button:hover {
  background-color: #d94300;
}

/* Tabla de resultados */
.report-table-wrapper {
  overflow-x: auto;
}

.report-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.report-table th,
.report-table td {
  padding: 12px;
  border: 1px solid #E0E0E0;
  text-align: left;
}

.report-table th {
  background-color: #1E2A5B;
  color: white;
  font-weight: 600;
  font-size: 0.95em;
}

.report-table tr:nth-child(even) {
  background-color: #f7f9fa;
}

/* Mensajes */
#payrollStatusMsg {
  margin-top: 10px;
  font-weight: bold;
  text-align: center;
}

.masked { filter: blur(7px); }

@media print {
  body * {
    visibility: hidden;
  }

  #payrollReport, #payrollReport * {
    visibility: visible;
  }

  #payrollReport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }

  /* Opcional: Oculta botones solo durante impresión */
  .filters, .report-actions, #exportToPDF {
    display: none !important;
  }
}

#payrollReportBody td.emp-name{
  cursor: pointer;
}
#payrollReportBody td.emp-name:hover{
  text-decoration: underline;
  text-underline-offset: 2px;
}
#dashModalTitle{
  white-space: pre-line;   /* respeta \n */
  line-height: 1.25;
}

/* Overlay */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal.hidden { display: none; }

/* Card */
.modal .modal-content{
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e9edf3;
  box-shadow: 0 24px 80px rgba(2, 6, 23, .25);
  width: min(92vw, 760px);
  max-height: 90vh;
  overflow: hidden;
  animation: modal-pop .18s ease-out;
}

/* Header */
.modal .modal-header{
  position: relative;
  padding: 18px 22px 8px;
  text-align: center;
  border-bottom: 1px solid #eef2f7;
}
#dashModalTitle{
  margin: 0;
  color: #1E2A5B;              /* azul marca */
  letter-spacing: .03em;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.2;
}
.modal-subtitle{
  margin: 4px 0 0;
  color: #64748b;              /* gris suave */
  font-size: 13px;
}

/* Close button */
.modal__close{
  position: absolute;
  top: 10px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
  cursor: pointer;
  line-height: 1;
  display: grid; place-items: center;
  transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}
.modal__close:hover{ background: #f8fafc; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.modal__close:active{ transform: translateY(1px); }
.modal__close:focus-visible{ outline: 3px solid rgba(255,79,0,.4); outline-offset: 2px; }

/* Body + table */
.modal .modal-body{ padding: 14px 18px 18px; overflow: auto; }
#dashDetailTable{ width: 100%; border-collapse: collapse; }
#dashDetailTable th, #dashDetailTable td{
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums; /* alinea mejor números */
}
#dashDetailTable thead th{
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}
#dashDetailTable tbody tr:hover{ background: #fbfdff; }
#dashDetailTable tfoot th{
  background: #fff;
  color: #0f172a;
  font-weight: 800;
}

/* Pop animation */
@keyframes modal-pop{
  from{ transform: translateY(4px) scale(.98); opacity: .0; }
  to  { transform: translateY(0)    scale(1);   opacity: 1;  }
}

/* Responsive: compacta padding en pantallas muy pequeñas */
@media (max-width: 420px){
  .modal .modal-header{ padding: 14px 14px 6px; }
  .modal .modal-body{ padding: 10px 12px 12px; }
}
