/* Custom styles for FBR Accounting System */

:root {
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}


::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Login page styles */
.bg-login-image {
    background: linear-gradient(rgba(78, 115, 223, 0.8), rgba(78, 115, 223, 0.9)), 
                url("https://source.unsplash.com/random/1600x900/?business,office");
    background-position: center;
    background-size: cover;
}

/* Dashboard cards */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* DataTables customization */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_length select {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
}

.dataTables_filter input {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
}

/* Form controls */
.form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Select2 customization */
.select2-container--bootstrap4 .select2-selection {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
}

.select2-container--bootstrap4 .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
}

/* Buttons */
.btn {
    border-radius: 0.35rem;
    font-weight: 400;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

/* Sidebar customization */
.sidebar {
    background-color: var(--primary-color);
}

.sidebar-dark .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-dark .nav-item .nav-link:hover {
    color: #fff;
}

/* Topbar customization */
.topbar {
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
}

/* Invoice styles */
.invoice-header {
    background-color: #f8f9fc;
    border-bottom: 2px solid #4e73df;
    padding: 1rem;
    margin-bottom: 1rem;
}

.invoice-items-table {
    border: 1px solid #e3e6f0;
}

.invoice-items-table th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
}

/* Stock alert styles */
.low-stock {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.out-of-stock {
    background-color: #e74a3b;
    color: white;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .invoice-items-table {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .card-header,
 .footer {
        display: none !important;
    }
    
    #content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes pulseLogo {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-logo {
    animation: pulseLogo 3s infinite ease-in-out;
}

/* Custom badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
}

/* Status indicators */
.status-active {
    background-color: #1cc88a;
    color: white;
}

.status-inactive {
    background-color: #858796;
    color: white;
}

.status-pending {
    background-color: #f6c23e;
    color: white;
}

.status-paid {
    background-color: #1cc88a;
    color: white;
}

.status-overdue {
    background-color: #e74a3b;
    color: white;
}

/* Tax calculation display */
.tax-breakdown {
    background-color: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* FBR compliance indicators */
.fbr-compliant {
    border-left: 4px solid #1cc88a;
    padding-left: 1rem;
}

.fbr-warning {
    border-left: 4px solid #f6c23e;
    padding-left: 1rem;
}

.fbr-error {
    border-left: 4px solid #e74a3b;
    padding-left: 1rem;
}

/* Reports styling */
.report-section {
    background-color: white;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.report-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    border-radius: 0.35rem 0.35rem 0 0;
}

.report-body {
    padding: 1.25rem;
}

/* Settings page styling */
.settings-section {
    background-color: white;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.settings-header {
    background-color: #4e73df;
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 0.35rem 0.35rem 0 0;
}

.settings-body {
    padding: 1.25rem;
}

/* User management styling */
.user-card {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    transition: all 0.3s ease;
}

.user-card:hover {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transform: translateY(-2px);
}

/* Company branding */
.company-logo {
    max-width: 200px;
    max-height: 100px;
    object-fit: contain;
}

/* Financial highlights */
.financial-highlight {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    border-radius: 0.35rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.financial-highlight h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.financial-highlight p {
    margin: 0;
    opacity: 0.9;
}

/* Accounts page styling */
.accounts-header {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    border-radius: 0.35rem 0.35rem 0 0;
}

.accounts-table th {
    background-color: #f8f9fc;
    font-weight: 600;
    color: #4a5568;
}

.accounts-table td {
    vertical-align: middle;
}

.accounts-table tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

.account-code {
    font-weight: 600;
    color: #4a5568;
}

.account-type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.account-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.filter-section {
    background-color: #f8f9fc;
    border-radius: 0.35rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .account-actions .btn {
        padding: 0.15rem 0.35rem;
        font-size: 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2c3e50;
        color: #ecf0f1;
    }
    
    .card-header {
        background-color: #34495e;
        color: #ecf0f1;
    }
    
    .form-control {
        background-color: #34495e;
        color: #ecf0f1;
        border-color: #4a5568;
    }
    
    .accounts-table th {
        background-color: #34495e;
        color: #ecf0f1;
    }
    
    .filter-section {
        background-color: #34495e;
    }
}