/* Cobranzas View - Diseño Minimalista Moderno */

/* Reset y estilos base */
* {
    box-sizing: border-box;
}

/* Contenedor principal */
.cobranza-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Secciones principales */
.cobranza-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.cobranza-section:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.cobranza-disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #f8f9fa !important;
}

/* Headers de sección */
.section-header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* Cuerpo de sección */
.section-content {
    padding: 25px;
}

/* Estilos para párrafos y textos */
p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: #495057;
}

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.field-value {
    display: block;
    font-size: 16px;
    color: #212529;
    font-weight: 500;
    margin-bottom: 20px;
    min-height: 20px;
    padding: 8px 0;
}

/* Botones modernos */
.btn {
    border-radius: 8px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    padding: 12px 24px;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40,167,69,0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.4);
}

.btn-default {
    background: white;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-default:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

/* Tablas modernas */
.gwt-CellTable {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 15px;
}

.gwt-CellTable-Header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
}

.gwt-CellTable-Header td {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    padding: 15px 12px;
    border-right: 1px solid #dee2e6;
}

.gwt-CellTable-Cell {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f3f4;
    border-right: 1px solid #f1f3f4;
    font-size: 14px;
    color: #495057;
}

.gwt-CellTable tbody tr:hover {
    background: rgba(0,123,255,0.05);
}

.gwt-CellTable tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Alertas estilo moderno */
.cobranza-alert {
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    border: none;
    font-size: 14px;
    font-weight: 500;
}

.cobranza-alert.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.cobranza-alert.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Resumen especial */
.resumen-container {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
}

.resumen-container .section-header {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.total-display {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    display: inline-block;
    min-width: 120px;
    text-align: right;
}

.text-success {
    color: #28a745 !important;
    font-weight: 600;
}

.text-danger {
    color: #dc3545 !important;
    font-weight: 600;
}

.text-warning {
    color: #fd7e14 !important;
    font-weight: 600;
}

/* Estilos mejorados para modales */
.gwt-DialogBox {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: none;
    overflow: hidden;
    min-width: 600px;
    max-width: 90vw;
}

.gwt-DialogBox-Caption {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
    padding: 25px 30px;
    font-weight: 600;
    font-size: 18px;
    border-bottom: 1px solid #dee2e6;
}

.gwt-DialogBox-Content {
    background: white;
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Tablas dentro de modales */
.modal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.modal-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.modal-table th {
    padding: 15px 12px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
}

.modal-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
    color: #495057;
}

.modal-table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-table tbody tr:hover {
    background: rgba(0,123,255,0.08);
    transform: translateX(2px);
}

.modal-table tbody tr.selected {
    background: rgba(0,123,255,0.15);
    border-left: 4px solid #007bff;
}

/* Búsqueda en modales */
.search-container {
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    outline: none;
    background: white;
}

.search-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Botones de modal */
.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: flex-end;
    border-top: 1px solid #e9ecef;
    padding-top: 25px;
}

.modal-buttons .btn {
    min-width: 120px;
    font-size: 14px;
}

/* Checkbox personalizado para selección múltiple */
.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-checkbox:hover .checkmark {
    background-color: #e9ecef;
    border-color: #007bff;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Lista de facturas seleccionadas */
.selected-items-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.selected-items-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.selected-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.selected-item:last-child {
    margin-bottom: 0;
}

.selected-item .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selected-item .remove-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cobranza-main {
        padding: 10px;
    }
    
    .gwt-DialogBox {
        min-width: 95vw;
        margin: 10px;
    }
    
    .gwt-DialogBox-Content {
        padding: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons .btn {
        width: 100%;
    }
    
    .modal-table {
        font-size: 12px;
    }
    
    .modal-table th,
    .modal-table td {
        padding: 10px 8px;
    }
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cobranza-section {
    animation: slideIn 0.5s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gwt-DialogBox {
    animation: modalAppear 0.3s ease-out;
}

/* Estados adicionales */
.section-completed {
    border-color: #28a745;
    box-shadow: 0 2px 12px rgba(40,167,69,0.2);
}

.section-completed .section-header {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.section-active {
    border-color: #007bff;
    box-shadow: 0 2px 12px rgba(0,123,255,0.2);
}

.section-active .section-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}
.heading-cobranza{
    filter: drop-shadow(0.5px 0.5px 0.5px #040404);
    font-weight: 700;
    font-size: xx-large;
    padding: 1rem;
}