/* --- ESTILOS BASE Y RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
    background-color: #f9f9f9;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* div cabecera*/
.modal-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.modal-header h3{
  margin: 0;
}
.close-modal {
  cursor: pointer;
}
.modalTitle{
  font-size: 0.89em;
  color: chocolate;
}
/* --- CONTENEDORES PRINCIPALES --- */
#divmsj {
    
    text-align: center;
  /*  height: 80px;*/
    max-width: 100%;
    width: 600px;
    color: #4d3461;
        font-size: 11px;
        text-align: justify;
}
/*contenedor padre define el ancho para todos */
.elemento {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Fuerzo a que todos los DIVs de las pestañas ignoren su contenido y sigan al padre */
#e1, #e2, #e3, #e4, #e5, #salaryForm {
    width: 100% !important;
    display: block; 
    box-sizing: border-box;
}

/* Ocultar por defecto (el JS se encarga de mostrar el activo) */
#e1, #e2, #e3, #e4, #e5 {
    display: none;
}

#e1 { background: rgba(127, 180, 236, 0.1); border-radius: 10px; padding: 3mm; }
#e2 { background: rgba(236, 236, 57, 0.1); border-radius: 10px; padding: 3mm; }
#e3 { background: rgba(247, 130, 44, 0.1); border-radius: 10px; padding: 3mm; }
#e4 { background: rgba(127, 255, 212, 0.1); text-align: justify; text-justify: inter-word; }

/* --- FORMULARIOS --- */
.form-group { margin-bottom: 12px; width: 100%; }
.form-group2 { margin-bottom: 12px; display: inline-flex; align-items: center; }
.form-group3 { display: flex; gap: 8px; margin: 16px 0; }
label { display: block; margin-bottom: 4px; font-size: 14px; }

select, input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 8px;
}

/* --- ESTILO RECIBO --- */
/* Contenedor principal*/
#divTabla {
    width: 95%;
    max-width: 800px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e8ed;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background-image: url("https://app.rodriguez.com.ar/simhc/images/pluma.gif");
  background-repeat: no-repeat;
  background-size: 50px;
  background-position: 50% 50%;
  background-color: rgba(255, 255, 255, 0.70);
  background-blend-mode: lighten;
 
}

.tablarecibos {
    width: 100%;
    border-collapse: collapse;
	/*    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select:none;
    user-select:none;*/
}

#tsueldobruto {
  color: #0004ff;
}

#tdescuentos {
  color: #cf0909;
}
#montofinal {
  color: #3d9700;
  font-weight: 700;
}
.descuentos,.haberes,.montos{
	text-align: right;
}

/* Encabezado*/
#theadr th {
    background-color: #f8f9fa;
    color: #5d6d7e;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px;
    border-bottom: 2px solid #edf2f7;
    text-align: left;
}

/* Filas de datos */
#tbodyr tr {
    border-bottom: 1px solid #f1f4f8;
    transition: all 0.3s ease;
}

#tbodyr td {
    padding: 5px 20px;
    font-size: 13.5px;
 /*   color: #2c3e50;*/
    vertical-align: middle;
}
.aaalgo{color: #ff00004f;
		text-align: justify;
  text-justify: inter-word;
  pointer-events: none;
     -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select:none;
    user-select:none;}
/* Fila 1 */
#tbodyr tr:nth-child(1) {
    background-color: #2c3e50 !important;
}
#tbodyr tr:nth-child(1) td {
    color: #ffffff !important;
    font-weight: 600;
    text-align: center !important;
    font-size: 15px;
}

/* Fila 2 */
#tbodyr tr:nth-child(2) {
    background-color: #f0f7ff !important;
}
#tbodyr tr:nth-child(2) td {
    color: #1a73e8 !important;
    font-weight: 700;
}

/* --- ADAPTACIÓN PARA MÓVILES (ESTILO TARJETA) --- */
@media screen and (max-width: 500px) {
    #theadr { display: none; } /* Escondemos los títulos de columna */

    #tbodyr tr {
        display: flex;
        flex-direction: column; /* Apilamos las celdas una bajo otra */
        padding: 10px 0;
        border-bottom: 8px solid #f7f9fc;
    }

    #tbodyr td {
        display: flex;
        justify-content: space-between; /* Texto a la izquierda, Valor a la derecha */
        padding: 6px 20px;
        border: none;
    }

   
    #tbodyr td:first-child {
        font-weight: 800;
        color: #1a202c;
        font-size: 14px;
        background: #fcfcfc;
    }
.aaalgo{color: #ff00004f;
		text-align: justify;
  text-justify: inter-word;
  pointer-events: none;
	       -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select:none;
    user-select:none;
	   }
	#tsueldobruto {
  color: #0004ff;
}

#tdescuentos {
  color: #cf0909;
}
#montofinal {
  color: #3d9700;
  font-weight: 700;
}
	.descuentos,.haberes,.montos{
	text-align: right;
}
  
    #tbodyr td:last-child {
     /*   color: #2ecc71; 
        font-weight: 700; */
    }
}
/* --- BOTONES --- */
.button-container {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
    justify-content: center; /* Centra los botones en el contenedor */
}

button {
  
    padding: 10px 24px; 
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    min-width: 140px; 
}

/* BOTÓN PRIMARIO (Azul) */
.btn-primary { 
    background-color: #2196F3; 
    color: #fff; 
}
.btn-primary:hover { 
    background-color: #1976D2; 
}

/* BOTÓN SECUNDARIO / RESET (Gris/Oscuro) */
button[type="reset"], .btn-secondary { 
    background-color: #757575; 
    color: #fff; 
}
button[type="reset"]:hover, .btn-secondary:hover { 
    background-color: #616161; 
}
/* panel de comparacion*/
.panel-comparacion{background: #f8f9fa; padding: 15px; border-radius: 8px; border: 1px solid #ddd; margin: 10px 0;justify-content: center;display: grid;"}
/* --- MEDIA QUERY (Ajuste para móviles) --- */
@media screen and (max-width: 600px) {
    .button-container { 
        flex-direction: row; /* Los mantenemos uno al lado del otro si caben */
        flex-wrap: wrap;    /* Si son muy anchos, bajan solos */
    }
    
    button { 
        flex: 1; /* En móvil sí pueden crecer un poco más para ser "touch-friendly" */
        padding: 14px; 
    }
}

/* carga inicial y procesamiento */
 /* gif carga web */
   .loader {
       position: fixed;
       left: 0px;
       top: 0px;
       width: 100%;
       height: 100%;
       z-index: 9999;
       background: url('/simhc/images/g3b.gif') 50% 50% no-repeat rgb(249, 249, 249);
       background-size: 25% auto;
       opacity: .8;
       /*H0bj*/
   }

   /* fin*/
   /* gif proceso js*/
   .loader2 {
       position: fixed;
       left: 0px;
       top: 0px;
       width: 100%;
       height: 100%;
       z-index: 9999;
       background: url('/simhc/images/g2.gif') 50% 50% no-repeat rgb(249, 249, 249);
     /*unamed*/  
       opacity: .8;
       background-size: 35% auto;
   }
#oico{
opacity: .01;
}
 /* Mensaje Error*/
   #divmsj {
       
       /* height: 80px;*/
        max-width: 100%;
        width:600px;
        color: #4d3461;
            font-size: 11px;
            text-align: justify;
   }
   
      #aguinaldo {
       color: rgb(79, 246, 7);
       background-color: #000;
       border-radius: 2px;
       font-size: 11px;
       text-align: center;
       animation: pulso 40s infinite;

   }
   @keyframes pulso {
0% {
  transform: scale(1);
  background-color: #000;
  color: rgb(79, 246, 7);
  font-size: 12px;
}
15% {
  transform: scale(1);
  background-color: #000;
  color: rgba(222, 246, 7, 0.952);
  font-size: 12px;
}
30% {
  transform: scale(1);
  background-color: #000;
  color: rgb(252, 171, 9);
  font-size: 12px;
  }
  45% {
      transform: scale(1);
      background-color: #000;
      color: #f2c6ff;
      
      font-size: 12px;
  }
  60% {
    transform: scale(1);
    background-color: #000;
    color: #feeea5;
    
    font-size: 12px;
}
75% {
    transform: scale(1);
    background-color: #000;
    color: #ffcafd
    
    font-size: 12px;
}
90% {
    transform: scale(1);
    background-color: #000;
    color: rgb(255, 255, 255);
    
    font-size: 12px;
}
100% {
    transform: scale(1);
    background-color: #000;
    color: rgb(79, 246, 7);
    
    font-size: 12px;
}
  }
#obs {
color: red;
    font-size: 8px;
    text-align: center;
    overflow-wrap: break-word;
    width: 500px;
    margin: 0 auto;
    
}


/* --- CONFIGURACIÓN DE IMPRESIÓN DEFINITIVA --- */
@media print {
    /* 1. Ocultamos el body por completo */
    body,#salaryForm {
        visibility: hidden !important;
        background: #fff !important;
		   display: none !important;
    
    }

    /* 2. Hacemos visibles ÚNICAMENTE nuestros dos contenedores principales */
    #divmsj, #divTabla {
        visibility: visible !important;
        position: relative !important; /* Resetea posicionamientos absolutos previos */
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 20px auto !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* 3. Forzamos a que TODO lo que esté adentro de ellos también sea visible */
    #divmsj *, #divTabla * {
        visibility: visible !important;
    }

    /* 4. Eliminamos espacios en blanco vacíos que dejan otros contenedores grandes ocultos */
    /* Aquí listamos las secciones de tu HTML que sabemos que NO deben ocupar espacio */
    .modal-header, .elemento, .button-container, .loader, .loader2, #salaryForm, .panel-comparacion {
        display: none !important;
    }

    /* 5. Asegurar la impresión de fondos (colores de tabla, pluma.gif) */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}