/* Custom styles for Client Management Platform */

/* Override only when necessary - Bootstrap theme handles most styling */

/* Ensure proper spacing for cards */
.card {
    margin-bottom: 1rem;
}

/* File upload styling */
.form-control[type="file"] {
    padding: 0.375rem 0.75rem;
}

/* Status badges styling */
.badge.fs-6 {
    font-size: 0.875rem !important;
}

/* Table row highlighting for overdue items */
.table-danger {
    --bs-table-bg: rgba(220, 53, 69, 0.1);
}

/* Ensure proper spacing in button groups */
.btn-group .btn {
    border-radius: 0.375rem;
}

.btn-group .btn:not(:first-child) {
    margin-left: 2px;
}

/* Dashboard card hover effects */
.dashboard-card {
    transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

/* Form styling improvements */
.form-label {
    font-weight: 500;
}

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

/* Modal improvements */
.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
}

/* File size display */
.file-size {
    font-size: 0.875rem;
    color: var(--bs-secondary);
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.status-draft {
    background-color: var(--bs-secondary);
}

.status-indicator.status-sent {
    background-color: var(--bs-warning);
}

.status-indicator.status-paid {
    background-color: var(--bs-success);
}

.status-indicator.status-overdue {
    background-color: var(--bs-danger);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Print styles for invoices */
@media print {
    .navbar,
    .btn,
    .modal,
    footer {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-left: 0;
        margin-bottom: 2px;
        border-radius: 0.375rem !important;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Error state styling */
.is-invalid {
    border-color: var(--bs-danger);
}

.invalid-feedback {
    display: block;
    color: var(--bs-danger);
}

/* Success state styling */
.is-valid {
    border-color: var(--bs-success);
}

.valid-feedback {
    display: block;
    color: var(--bs-success);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray-200);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Ensure proper line height for multi-line text */
.table td {
    line-height: 1.5;
}

/* Fix for nl2br filter output */
p[style*="white-space"] {
    white-space: pre-line !important;
}
