/* Reset básico */
* {
    box-sizing: border-box;
}



body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica', sans-serif;
    color: #333;
    background: linear-gradient(to top, #e6e6e6 0%, #ffffff 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}



/* Contenedor principal */
.container {
    position: relative;
    padding-top: 20px;
	padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 80px);
}

/* Logo */
.logo {
	max-width: 400px;
    margin: 0 auto 10px auto;
    display: block;
	background: transparent;
}

h4 {
    background-color: #eef2f5;
    border: 1px solid #ccc;
    padding: 8px 12px;
    margin: 12px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: inline-block;
}


/* Caja de login */
.login-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 320px;
    text-align: left;
}

.login-box label {
    display: block;
    margin-top: 15px;
    font-size: 16px;
    color: #444;
}

.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="submit"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.login-box input[type="submit"] {
    background-color: #0077cc;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-box input[type="submit"]:hover {
    background-color: #005fa3;
}

/* Mensaje de error */
.error-msg {
    background-color: #ffdddd;
    color: #d8000c;
    border: 1px solid #d8000c;
    padding: 12px;
    margin-top: 20px;
    border-radius: 6px;
    width: 360px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: relative;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    padding: 10px 0;
    font-size: 13px;
    color: #666;
    text-align: center;
}

footer .cookies {
    font-style: italic;
    margin-top: 5px;
}

/* Tabla de trabajos ****************************************************************/

/* 📐 Configuración general de la tabla de trabajos */
.tabla-trabajos {
    border-collapse: collapse;
    width: 90%;
    max-width: 1000px;
    margin-top: 30px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

/* 🧱 Estructura de celdas */
.tabla-trabajos th,
.tabla-trabajos td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
    vertical-align: top;
}

/* 🎨 Encabezado */
.tabla-trabajos th {
    background-color: #0077cc;
    color: white;
    font-weight: normal;
}

/* 🌈 Filas */
.tabla-trabajos tr {
    background: linear-gradient(to top, #eaf4ff 0%, #ffffff 100%);
}

.tabla-trabajos tr:hover {
    background: #f5f5f5;
}

/* 🚨 Tareas detenidas */
.tabla-trabajos tr.linea-detenida td {
    background: #ffe5e5 !important;
}

/* 🧾 Tipografía específica */
.tabla-trabajos td small {
    white-space: nowrap;
    display: inline-block;
    width: 100%;
    font-size: 12px;
}

.tabla-trabajos td strong {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 📏 Anchos de columnas */
.tabla-trabajos .col-certificado { width: 30px; }
.tabla-trabajos .col-foto        { width: 30px; }
.tabla-trabajos .col-documento   { width: 220px; }
.tabla-trabajos .col-estado      { width: 100px; }
.tabla-trabajos .col-envios      { width: 100px; }
.tabla-trabajos .col-notas       { width: 100px; }
.tabla-trabajos .col-acciones    { width: 100px; }


/**********************************************************/

.descripcion {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: #555;
    word-break: break-word;
}

/* Botones de acción */
.btn-editar, .btn-borrar {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.btn-editar:hover, .btn-borrar:hover {
    transform: scale(1.2);
}

/* Notas con previsualización */
.nota-bloque {
    display: flex;
    flex-direction: column;
    max-width: 180px;
    line-height: 1.2;
}

.nota-preview {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nota-env {
    font-size: 12px;
    color: #007700;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}



/* Alerta de trabajos detenidos */
.alerta-detenidos {
    background-color: #ffe5e5;
    border: 1px solid #d8000c;
    color: #d8000c;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.trabajo-detenido-linea {
    display: flex;
	flex-direction: column;
    align-items: left;
    background-color: #fff0f0;
    border: 1px solid #d8000c;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.trabajo-detenido-linea .acciones {
    flex-shrink: 0;
    margin-right: 12px;
}

.trabajo-detenido-linea .btn-editar,
.trabajo-detenido-linea .btn-borrar {
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 6px;
    transition: transform 0.2s ease;
}

.trabajo-detenido-linea .btn-editar:hover,
.trabajo-detenido-linea .btn-borrar:hover {
    transform: scale(1.2);
}

.trabajo-detenido-linea .contenido {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.trabajo-detenido-linea .descripcion {
    color: #333;
}

.trabajo-detenido-linea .notas {
    color: #d8000c;
    font-style: italic;
}

.trabajo-detenido-linea .motivo {
    margin-top: 6px;
    font-style: italic;
    color: #d8000c;
    white-space: pre-wrap;
	padding-left: 210px;
}

.trabajo-detenido-linea .fecha {
    color: #000;
    font-weight: bold;
    font-size: 14px;
    margin-right: 6px;
}

.btn-editar {
    border: 2px solid #0077cc; /* azul */
    border-radius: 4px;
    padding: 4px 6px;
    background: none;
    color: #0077cc;
}

.btn-borrar {
    border: 2px solid #d8000c; /* rojo */
    border-radius: 4px;
    padding: 4px 6px;
    background: none;
    color: #d8000c;
}

/* MODAL edicion */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-contenido {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-contenido h3 {
    margin-top: 0;
}

.modal-contenido label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.modal-contenido input,
.modal-contenido textarea {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.modal-acciones {
    margin-top: 15px;
    text-align: right;
}

.modal-acciones button {
    margin-left: 10px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Bloque FILTROS */
.bloque-filtros {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 10px 10px;
    margin: 5px auto;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 13px;
    width: 90%;
    max-width: 1000px;
}

/* Grid de filtros con columnas automáticas */
.filtros-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    align-items: flex-end;
}

/* Cada filtro */
.filtro-item {
    display: flex;
    flex-direction: column;
}

/* Etiquetas */
.filtro-item label {
    margin-bottom: 4px;
    font-weight: normal;
	
}

/* Controles con tamaños manuales */
#filtro-estado {
    width: 100px;
}

#filtro-busqueda {
    width: 150px;
}

#filtro-fecha-tipo {
    width: 80px;
}

#filtro-fecha-desde,
#filtro-fecha-hasta {
    width: 120px;
}

#filtro-invertir {
    width: 140px;
}

/* Estilos generales para inputs y selects */
.filtro-item select,
.filtro-item input[type="text"],
.filtro-item input[type="date"] {
    padding: 4px 6px;
    font-size: 13px;
    height: 28px;
    box-sizing: border-box;
}

/* Botones */
.botones-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: nowrap;
}

.botones-wrapper button {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 4px;
    min-width: 100px;
    border: none;
    cursor: pointer;
}

/* Estilos específicos de botones */
#btn-reset {
    background-color: #999;
    color: white;
}

#btn-exportar {
    background-color: #28a745;
    color: white;
}

/*Flotante certificados */
.certificado-wrapper {
    display: inline-block;
    position: relative;
}

.certificado-popup {
    position: fixed;
    top: 100px; /* se ajusta dinámicamente */
    left: 100px;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    padding: 12px;
    width: 440px;
    display: none;
}



.cert-card {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
	
}

.cert-card:last-child {
    border-bottom: none; 
}

.acuse {
    margin-top: 6px;
    font-size: 12px;
    color: #007700;
    font-style: italic;
}