/* assets/css/public.css */

/* ---------- Global Fonts & Reset ---------- */
body, input, select, button {
    font-family: 'Inter', sans-serif;
}

tbody tr {
    border-bottom: 2px solid #eee;
}

body {
    font-size: clamp(14px, 1.5vw, 16px);
}

/* ---------- Contenedores Generales ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-table-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', sans-serif;
    margin-bottom: 2rem;
}

/* ---------- Formularios ---------- */
.custom-form-container,
.edit-user-container {
    max-width: 500px;
    margin: 2rem auto;
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.custom-form-container h2,
.edit-user-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #000;
}

.custom-form-container label,
.edit-user-container label {
    font-weight: bold;
    font-size: 16px;
    display: block;
    text-align: left;
    color: #333;
}

.custom-form-container input,
.custom-form-container select,
.edit-user-container input,
.edit-user-container select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease-in-out, background 0.3s ease-in-out;
}

.custom-form-container input:focus,
.custom-form-container select:focus,
.edit-user-container input:focus,
.edit-user-container select:focus {
    border-color: #2DA884;
    outline: none;
    background: #fff;
}

.custom-form-container form,
.edit-user-container form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Ajuste para survey_or_quote */
#survey_or_quote {
    display: flex;
    align-items: center;
    gap: 20px; /* Espacio entre cada grupo (Survey, Job, etc.) */
    flex-wrap: wrap;
    align-items: center;
}
#survey_or_quote label {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre el input y el texto del label */
}

.custom-form-container #survey_or_quote {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* ---------- Botones ---------- */
.action-buttons {
    display: flex;
    justify-content: center; /* centra los botones */
    align-items: center;
    gap: 10px; /* espacio entre botones */
    flex-wrap: wrap; /* permite que los botones se acomoden en varias líneas en pantallas pequeñas */
}

.action-buttons a,
.action-buttons button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* margen entre botones */
    justify-content: center; /* centra los botones en contenedores más pequeños */
}
.button-group button {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
}

button, .btn-update, .btn-edit, .btn-back, .cancel, .edit {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease;
    text-align: center;
}

.btn-update, .btn-edit {
    background: #2DA884;
    color: white;
    border: none;
}

.btn-update:hover, .btn-edit:hover {
    background: #127B5D;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-back {
    background: transparent;
    color: #333;
    border: 2px solid #bbb !important;
}


.btn-back:hover {
    background: #f8f9fa;
    border-color: #2DA884 !important;
    color: #2DA884;
}

/* Botón View (verde) */
.btn-view {
    color: #2DA884;
}

.delete-user, 
.delete-customer, 
.delete-report, 
.delete-expense, 
.delete-template,
.btn-delete {
    background: transparent;
    color: #DC3545;
    border: none;
}

.delete-user:hover, 
.delete-customer:hover, 
.delete-report:hover, 
.delete-expense:hover, 
.delete-template:hover,
.btn-delete:hover {
    background: transparent !important;
    color: #DC3545 !important;
    opacity: 1; /* quita la opacidad aplicada en el hover global */
}

/* Botón para añadir usuario */
.btn-add-user {
    background: #2DA884;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease;
    text-align: center;
}

.btn-add-user:hover {
    background: #127B5D;
    color: white;
}

/* ---------- Modales ---------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
}


.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 350px;
    max-width: 90%;
}

.modal-success { color: green; }
.modal-error { color: red; }

/* ---------------- BOTONES DEL MODAL ---------------- */
.modal-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.modal-buttons button {
    width: 150px; /* Ancho fijo para que ambos botones tengan el mismo tamaño */
    text-align: center;
}

.btn-cancel, .btn-confirm {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease;
    width: 120px;
    text-align: center;
}


.btn-cancel {
    background: transparent;
    color: #2DA884;
    border: 2px solid #2DA884;
}

.btn-cancel:hover {
    background: #f8f9fa;
    color: #2DA884;
}

.btn-confirm {
    background: #DC3545;
    color: white;
    border: none;
}

.btn-confirm:hover {
    background: #b02a37;
}

/* ---------- Filtros ---------- */
.user-table-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', sans-serif;
    margin-bottom: 2rem;
}

/* Estilos responsive para la sección de filtros */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-radius: 6px;
    margin-bottom: 20px;
}

.filter-container form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.filter-container input,
.filter-container select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    min-width: 150px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filter-container input:focus,
.filter-container select:focus {
    border-color: #2DA884;
    background-color: #fff;
    outline: none;
}

.filter-container button,
.filter-container a.btn-clear-filters {
    background: #2DA884;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.filter-container button:hover,
.filter-container a.btn-clear-filters:hover {
    background: #127B5D;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    transition: background 0.3s ease;
}

thead {
    background-color: #2DA884;
    color: white;
}

tbody tr:hover {
    background-color: #f1f1f1;
}

/* ---------- Paginación ---------- */
.pagination.pagination-custom {
    text-align: center;
    margin: 20px 0;
}

.pagination.pagination-custom .pag-link {
    display: inline-block;
    margin: 0 5px;
}

.pagination.pagination-custom .pag-link .page-numbers {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #2DA884;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.pagination.pagination-custom .pag-link .page-numbers.current {
    background: #2DA884;
    border-color: #2DA884;
    color: #fff;
}

/* ---------- Galería de Reportes ---------- */
.report-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.report-gallery a {
    display: block;
    width: 100px;
    height: 100px;
    overflow: hidden;
}

.report-gallery a img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s;
}

.report-gallery a:hover img {
    transform: scale(1.05);
}


/* Estilos comunes para los formularios de constantes (Currency e IVA) */
.currency-form-container,
.iva-form-container {
    max-width: 500px;
    margin: 2rem auto;
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.currency-form-container h2,
.iva-form-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #000;
}

.currency-form-container label,
.iva-form-container label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
    text-align: left;
    color: #333;
}

.currency-form-container input,
.iva-form-container input,
.currency-form-container select,
.iva-form-container select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.currency-form-container input:focus,
.iva-form-container input:focus,
.currency-form-container select:focus,
.iva-form-container select:focus {
    border-color: #2DA884;
    outline: none;
    background: #fff;
}

.currency-form-container button,
.iva-form-container button {
    width: 100%;
    padding: 10px;
    background: #2DA884;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.currency-form-container button:hover,
.iva-form-container button:hover {
    background: #127B5D;
}

/* Estilos para vistas de detalle reutilizables (User, Expense, Customer, Report, Template, etc.) */
.detail-view-container {
    max-width: 800px;
    margin: 2rem auto;
    background: #ffffff;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Título */
.detail-view-container h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    text-align: center;
    color: #333;
}

/* Estructura de los campos en la vista */
.detail-view-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eaeaea;
}

/* Etiqueta */
.detail-view-field strong {
    flex: 0 0 150px;
    font-size: 1rem;
    color: #2DA884;
    font-weight: 600;
    margin-right: 10px;
}

/* Contenido del campo */
.detail-view-field span {
    flex: 1;
    font-size: 1rem;
    color: #555;
    word-wrap: break-word;
}

/* Grupo de botones */
.detail-view-button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Botones */
.detail-view-button-group button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s;
    border: none;
    font-weight: 600;
}

/* Botón Editar */
.detail-view-button-group .btn-edit {
    background: #2DA884;
    color: white;
}

.detail-view-button-group .btn-edit:hover {
    background: #127B5D;
    transform: scale(1.05);
}

/* Botón Volver */
.detail-view-button-group .btn-back {
    background: transparent;
    color: #333;
    border: 2px solid #bbb;
}

.detail-view-button-group .btn-back:hover {
    background: #f8f9fa;
    border-color: #2DA884;
    color: #2DA884;
}

/* Estilos del modal de envios de correo */
.btn-send {
    color: #555;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-send:hover {
    color: #333;
    background-color: #f1f1f1;
}


/* signatures */
.current-signature {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 20px;
    position: relative;
    transition: opacity 0.3s;
}

.current-signature img {
    display: block;
    margin-bottom: 10px;
}

/* Estilos para aumentar el ancho del contenedor */
.certificate-container {
    max-width: 800px !important; /* Mayor ancho para el contenedor principal */
}

.certificate-container .custom-form-container {
    max-width: 100% !important; /* El formulario ocupa todo el ancho disponible */
    width: 100%;
}

/* Ajustes para los grupos de checkboxes */
#visit_type, #pest_types, #chemicals_types, #presence_section, #evidence_section, #received_payment {
    margin-bottom: 15px;
}

/* Estilo para los campos h3 y h4 */
.custom-form-container h3, 
.custom-form-container h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    color: #2DA884;
}

/* Mejora visual para las firmas */
.current-signature {
    margin-top: 10px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 20px;
    position: relative;
    transition: opacity 0.3s;
    background: #f9f9f9;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}


.current-signature img {
    display: block;
    margin-bottom: 15px;
    background: white;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 100%;
    max-height: 100px;
}


/* Distribuir los botones en el espacio disponible */
/* .button-group {
    margin-top: 30px;
}

.button-group button {
    min-width: 180px;
}

/* Ajuste de espaciado */
/* .edit-user-container {
    padding-bottom: 40px;
} */

/* Asegurar que los inputs de texto no sean demasiado pequeños */
/* input[type="text"], input[type="time"] {
    min-height: 40px;
} */

/* Permitir que ciertos elementos ocupen menos espacio horizontal */
/* label[for="other_pest"],
label[for="difenacoum_units"],
label[for="brodifacoum_units"],
label[for="bromadiolone_units"] {
    display: inline-block;
    width: 30%;
    margin-right: 5px;
} */

/* #other_pest,
#difenacoum_units,
#brodifacoum_units,
#bromadiolone_units {
    display: inline-block;
    width: 67%;
} */

/* Mejora en la distribución de los grupos de checkboxes */
/* #visit_type, 
#pest_types, 
#chemicals_types, 
#presence_section, 
#evidence_section, 
#received_payment {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
} */

/* Ajuste del ancho para los labels de checkbox */
/* #visit_type label, 
#pest_types label, 
#chemicals_types label, 
#presence_section label, 
#evidence_section label, 
#received_payment label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1 0 calc(33.333% - 10px); /* 3 elementos por fila con gap de 10px */
    /* min-width: 160px;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: background-color 0.2s, border-color 0.2s;
    margin: 0; 
    box-sizing: border-box; 
} */

/* Mejor estilo para los checkboxes */
/* #visit_type input[type="checkbox"], 
#pest_types input[type="checkbox"], 
#chemicals_types input[type="checkbox"], 
#presence_section input[type="checkbox"], 
#evidence_section input[type="checkbox"], 
#received_payment input[type="checkbox"] {
    margin: 0 0 0 10px;
    transform: scale(1.2);
    flex-shrink: 0;
} */

/* Ajustes para pequeños grupos como 'received_payment' o 'visit_type' */
/* #received_payment label,
#visit_type label {
    flex: 1 0 calc(25% - 10px);
    min-width: 180px;
} */

/* Para campos de texto específicos */
/* #other_pest,
#difenacoum_units,
#brodifacoum_units,
#bromadiolone_units {
    display: inline-block;
    width: calc(70% - 10px);
    margin-left: 10px;
} */
/* 
label[for="other_pest"],
label[for="difenacoum_units"],
label[for="brodifacoum_units"],
label[for="bromadiolone_units"] {
    display: inline-block;
    width: 30%;
} */

/* Mejora visual para secciones */
/* .certificate-container h3 {
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #2DA884;
    font-size: 18px;
}

.certificate-container h4 {
    margin-top: 20px;
    color: #555;
    font-size: 16px;
}  */

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.checkbox-group label {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="file"] {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #ddd;
    width: 100%;
}

.signature-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkbox-inline {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.checkbox-inline label {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* dos columnas iguales */
    gap: 10px 30px; /* espacio entre filas y columnas */
    width: 100%;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
}


