/* Statement of Account Module CSS */

/* Main container styles */
.statement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.statement-company-info h2 {
    margin: 0 0 10px 0;
    color: #495057;
}

.statement-company-info p {
    margin: 3px 0;
    color: #6c757d;
    font-size: 0.9em;
}

.statement-actions {
    display: flex;
    gap: 10px;
}

/* Period display */
.statement-period {
    margin: 15px 0;
    padding: 10px 15px;
    background-color: #e9ecef;
    border-radius: 5px;
}

.statement-period h3 {
    margin: 0;
    color: #495057;
    font-size: 1.1em;
}

/* Opening balance section */
.statement-opening-balance {
    margin-bottom: 20px;
}

.statement-opening-balance .liste_titre {
    background-color: #28a745 !important;
    color: white !important;
}

/* Statement table */
.statement-table {
    margin-bottom: 20px;
}

.statement-table #searchInput {
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 300px;
}

.statement-table #searchInput:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Table header sorting */
.sortable {
    cursor: pointer;
    position: relative;
}

.sortable:hover {
    background-color: #d6d8db !important;
}

.sortable::after {
    content: '\25B4\25BE';
    position: absolute;
    right: 5px;
    color: #999;
    font-size: 10px;
}

/* Amount styles */
.amount {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Due and Overdue styles */
.due {
    color: #fd7e14 !important;
    font-weight: 600;
}

.overdue, .overdue-row td.overdue {
    color: #dc3545 !important;
    font-weight: 600;
}

.overdue-row {
    background-color: #fff5f5 !important;
}

/* Summary section */
.statement-summary {
    max-width: 400px;
    margin-left: auto;
    margin-top: 20px;
    border: 2px solid #495057;
    border-radius: 5px;
    overflow: hidden;
}

.statement-summary .liste_titre {
    background-color: #495057 !important;
    color: white !important;
}

.statement-summary tr:last-child td.overdue {
    background-color: #f8d7da;
}

.statement-summary tr:nth-last-child(2) td.due {
    background-color: #fff3cd;
}

/* Button styles */
.butAction {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .statement-header {
        flex-direction: column;
    }
    
    .statement-actions {
        margin-top: 15px;
        width: 100%;
    }
    
    .statement-table #searchInput {
        width: 100%;
    }
    
    .statement-summary {
        max-width: 100%;
    }
}

/* Print styles */
@media print {
    .statement-actions,
    #searchInput,
    .tabactive,
    .fichecenter,
    .fiche > form:first-child {
        display: none !important;
    }
    
    .statement-header {
        background: white;
        border: none;
    }
    
    .statement-table table,
    .statement-summary table {
        border-collapse: collapse;
    }
    
    .statement-table td,
    .statement-table th,
    .statement-summary td,
    .statement-summary th {
        border: 1px solid #000;
    }
}