/* Client Management Styles */

/* Header Styles */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 10px 0;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-left h2 {
    margin: 0;
    color: #212529;
    font-weight: 600;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
}

.action-left {
    flex: 1;
    margin-right: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.action-right {
    display: flex;
    gap: 10px;
}

/* Search and Sort Containers */
.search-container {
    position: relative;
    width: 300px;
}

.search-container input {
    padding-right: 30px;
    height: 38px;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.sort-container {
    width: 200px;
}

.sort-container .form-select {
    height: 38px;
    padding-right: 30px;
}

/* Filters Container */
.filters-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filters-container .form-group {
    margin-bottom: 0;
}

.filters-container label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

/* Table Header with Status Filter */
.table-header {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.status-filter {
    display: flex;
    gap: 10px;
}

.status-filter .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.status-filter .btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Table Styles */
.table-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-weight: 600;
    padding: 12px 15px;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.pagination {
    margin-bottom: 0;
}

/* Modal Styles */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-weight: 600;
    color: #212529;
}

.detail-label {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    clear: both;
}

.client-details p {
    margin-bottom: 0;
    color: #212529;
}

/* Form Validation */
.form-label .text-danger {
    margin-left: 3px;
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.form-control.is-invalid~.invalid-feedback {
    display: block;
}

/* Form Styles */
.form-control,
.form-select {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.text-danger {
    color: #dc3545;
}

/* Input Group Styles */
.input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group .form-control {
    flex-grow: 1;
}

.input-group .btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

/* Bank Details Section */
.bank-details-section {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #dee2e6;
}

.bank-details-section .detail-label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #495057;
}

.bank-details-section p {
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
    color: #212529;
    font-weight: 500;
}

/* Required Field Indicator */
.required-field::after {
    content: "*";
    color: #dc3545;
    margin-left: 4px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .content-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-left {
        width: 100%;
    }

    .header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .action-bar {
        flex-direction: column;
        gap: 15px;
    }

    .action-left {
        width: 100%;
        margin-right: 0;
        flex-wrap: wrap;
    }

    .search-container,
    .sort-container {
        width: 100%;
    }

    .action-right {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .action-right {
        flex-direction: column;
    }

    .action-right button {
        width: 100%;
    }

    .status-filter {
        justify-content: stretch;
    }

    .status-filter .btn {
        flex: 1;
    }

    .details-section {
        margin-bottom: 20px;
    }

    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-group .btn {
        width: 100%;
    }
}

/* Remove loading overlay styles */
.loading-overlay {
    display: none !important;
}

.progress-container {
    width: 300px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background-color: #0d6efd;
    width: 0;
    animation: progress-animation 1.5s ease-in-out infinite;
}

.loading-text {
    font-size: 1.1rem;
    color: #495057;
    font-weight: 500;
}

@keyframes progress-animation {
    0% {
        width: 0;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

/* View Client Modal Styles */
.modal-xl {
    max-width: 90%;
    margin: 1.75rem auto;
}

.details-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.detail-label {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.password-field {
    margin-bottom: 0;
    padding: 0.375rem 0.75rem;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    flex-grow: 1;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group .btn {
    padding: 0.375rem 0.75rem;
}

.bank-details-section {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
        margin: 1rem auto;
    }

    .details-section {
        margin-bottom: 20px;
    }
}

/* Invoice Tab Styles */
.nav-tabs .nav-link {
    color: #495057;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1rem;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #0d6efd;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: transparent;
    border-bottom: 2px solid #0d6efd;
}

.summary-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 100%;
    border: 1px solid #dee2e6;
}

.summary-card h6 {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.summary-card .amount {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.summary-card .date {
    font-size: 0.875rem;
    color: #6c757d;
}

#clientInvoicesTable th {
    background-color: #f8f9fa;
    font-weight: 600;
}

#clientInvoicesTable td {
    vertical-align: middle;
}