/* Custom styles for Client Document Management System */

/* Add some padding to the body */
body {
    padding-bottom: 50px;
}

/* Card styling */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    font-weight: 500;
}

/* Table styling */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    border-radius: 0.25rem;
    max-height: 600px;
    overflow-y: auto;
}

.table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 1;
}

/* Dashboard tabs */
.nav-tabs .nav-link {
    color: #495057;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
}

/* File upload styling */
.custom-file-input:focus ~ .custom-file-label {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Preview section */
.preview-section {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 1rem;
}

/* Transaction table */
.transaction-positive {
    color: #28a745;
}

.transaction-negative {
    color: #dc3545;
}

.transaction-count {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Alert styling */
.alert-permanent {
    margin-bottom: 1rem;
    border-left: 5px solid;
}

.alert-permanent.alert-warning {
    border-left-color: #ffc107;
}

.alert-permanent.alert-success {
    border-left-color: #28a745;
}

.alert-permanent.alert-info {
    border-left-color: #17a2b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.25rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.spinner-message {
    text-align: center;
    margin-top: 1rem;
}

/* Processing steps styling */
.processing-steps {
    font-size: 0.9rem;
}

.processing-steps .step {
    padding: 0.25rem 0;
    color: #6c757d;
    transition: color 0.3s ease;
}

.processing-steps .step.active {
    color: #007bff;
    font-weight: 500;
}

.processing-steps .step.completed {
    color: #28a745;
}

.processing-steps .step i {
    width: 16px;
    text-align: center;
}

/* Progress bar enhancements */
.progress {
    background-color: #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

/* PDF preview */
.pdf-preview {
    width: 100%;
    height: 500px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Highlight irregular transactions */
.irregular-transaction {
    background-color: rgba(255, 193, 7, 0.2);
}

/* Footer styling */
footer {
    margin-top: 3rem;
}

/* Pagination styling */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #0d6efd;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Tab styling */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    isolation: isolate;
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 600;
}

/* Document type specific colors */
.nav-tabs .nav-link i.fa-university {
    color: #007bff;
}

.nav-tabs .nav-link i.fa-credit-card {
    color: #17a2b8;
}

.nav-tabs .nav-link i.fa-file-invoice {
    color: #ffc107;
}

.nav-tabs .nav-link i.fa-users {
    color: #28a745;
}

.nav-tabs .nav-link i.fa-file-pdf {
    color: #dc3545;
}

/* Table header colors for different document types */
.table-primary {
    background-color: #cfe2ff;
}

.table-info {
    background-color: #d1ecf1;
}

.table-warning {
    background-color: #fff3cd;
}

.table-success {
    background-color: #d4edda;
}

.table-dark {
    background-color: #343a40;
}

/* Badge count styling in tabs */
.nav-tabs .badge {
    font-size: 0.75em;
    font-weight: 600;
}

/* Property Statement Category Styling */
.property-category-section {
    border-left: 4px solid #dee2e6;
    margin-bottom: 0.5rem;
}

.property-category-section.receipts {
    border-left-color: #198754;
}

.property-category-section.fees {
    border-left-color: #0d6efd;
}

.property-category-section.tax {
    border-left-color: #ffc107;
}

.property-category-section.disbursements {
    border-left-color: #0dcaf0;
}

/* Category summary cards hover effect */
.card.border-success:hover,
.card.border-primary:hover,
.card.border-warning:hover,
.card.border-info:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Category badges in table */
.badge.bg-success { background-color: #198754 !important; }
.badge.bg-primary { background-color: #0d6efd !important; }
.badge.bg-warning { background-color: #ffc107 !important; color: #000 !important; }
.badge.bg-info { background-color: #0dcaf0 !important; color: #000 !important; }

/* Property statement section dividers */
.property-statement .table tbody tr.table-success th,
.property-statement .table tbody tr.table-primary th,
.property-statement .table tbody tr.table-warning th,
.property-statement .table tbody tr.table-info th {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced footer styling for totals */
.property-statement .table tfoot th {
    font-size: 1.1rem;
    font-weight: 700;
}
