/* Custom styles for admin panel */

:root {
    --bs-primary: #4e73df;
    --bs-success: #1cc88a;
    --bs-info: #36b9cc;
    --bs-warning: #f6c23e;
    --bs-danger: #e74a3b;
    --bs-secondary: #858796;
    --bs-dark: #5a5c69;
    --bs-light: #f8f9fc;
}

/* Custom card borders */
.border-left-primary {
    border-left: 0.25rem solid var(--bs-primary) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--bs-success) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--bs-info) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--bs-warning) !important;
}

.border-left-danger {
    border-left: 0.25rem solid var(--bs-danger) !important;
}

/* Typography */
.text-xs {
    font-size: 0.7rem;
}

.font-weight-bold {
    font-weight: 700;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Custom table styles */
.table th {
    border-top: none;
    font-weight: 600;
    color: var(--bs-dark);
    background-color: var(--bs-light);
}

.table-responsive {
    border-radius: 0.35rem;
}

/* Custom badges */
.badge {
    font-size: 0.75em;
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
}

/* Custom pagination */
.pagination .page-link {
    color: var(--bs-primary);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.pagination .page-link:hover {
    color: var(--bs-primary);
    background-color: #e9ecef;
}

/* Custom form styles */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Custom button styles */
.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Card shadows */
.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

/* Navbar customization */
.navbar-brand {
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
}

.navbar-nav .nav-link.active {
    font-weight: 700;
}

/* Theme toggle button */
#themeToggle {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark theme variables */
[data-bs-theme="dark"] {
    --bs-light: #2d3748;
    --bs-secondary: #4a5568;
}

[data-bs-theme="dark"] .card {
    background-color: #2d3748;
    border-color: #4a5568;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #2d3748;
    --bs-table-color: #e2e8f0;
}

[data-bs-theme="dark"] .table th {
    background-color: #4a5568;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .text-gray-800 {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .border-left-primary,
[data-bs-theme="dark"] .border-left-success,
[data-bs-theme="dark"] .border-left-info,
[data-bs-theme="dark"] .border-left-warning,
[data-bs-theme="dark"] .border-left-danger {
    background-color: #2d3748;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Animation for loading states */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #4a5568;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #718096;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .pagination,
    .dropdown,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
    
    .chart-container {
        height: auto !important;
    }
}
