/* assets/css/custom.css */
:root {
    --primary: #4e73df;
    --secondary: #6c757d;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --light: #f8f9fc;
    --dark: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fc;
}

/* Sidebar styles */
.sidebar {
    min-height: 100vh;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
    border-left: 4px solid transparent;
}

.sidebar .nav-link:hover {
    background-color: rgba(78, 115, 223, 0.1);
    border-left: 4px solid rgba(78, 115, 223, 0.5);
}

.sidebar .nav-link.active {
    color: #4e73df;
    background-color: rgba(78, 115, 223, 0.1);
    border-left: 4px solid #4e73df;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

/* Card styles */
.card {
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

/* Login page styles */
.form-signin {
    width: 100%;
    max-width: 330px;
    padding: 15px;
    margin: auto;
}

.form-signin .form-floating:focus-within {
    z-index: 2;
}

.form-signin input[type="email"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Table styles */
.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* DataTables customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: #6c757d;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
    background: #4e73df;
    border-color: #4e73df;
}

/* Button styles */
.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
}

.btn-info {
    color: #fff;
    background-color: #36b9cc;
    border-color: #36b9cc;
}

.btn-info:hover {
    color: #fff;
    background-color: #2c9faf;
    border-color: #2a96a5;
}

.btn-warning {
    color: #fff;
    background-color: #f6c23e;
    border-color: #f6c23e;
}

.btn-warning:hover {
    color: #fff;
    background-color: #f4b619;
    border-color: #f4b30d;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #d52a1a;
}

/* Form styles */
.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

/* Responsive image gallery */
.image-gallery img {
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* File upload button styling */
.custom-file-upload {
    display: block;
    padding: 6px 12px;
    cursor: pointer;
    background-color: #f8f9fc;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    text-align: center;
}

.custom-file-upload:hover {
    background-color: #eaecf4;
}

/* Tabs styling */
.nav-tabs .nav-link {
    color: #6c757d;
    border: 1px solid transparent;
}

.nav-tabs .nav-link.active {
    color: #4e73df;
    border-color: #dddfeb #dddfeb #fff;
}

.nav-tabs .nav-link:hover {
    border-color: #eaecf4 #eaecf4 #dddfeb;
}

/* Small badge styling */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
}

/* Pagination styling */
.pagination .page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
}

.pagination .page-link {
    color: #4e73df;
}

.pagination .page-link:hover {
    background-color: #eaecf4;
}

/* Toast notification styling */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .sidebar, .no-print {
        display: none !important;
    }
    
    main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* Dark mode toggle */
.dark-mode-toggle {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    background-color: #f8f9fc;
    color: #5a5c69;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1030;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.2s ease-in-out;
}

.dark-mode-toggle:hover {
    background-color: #eaecf4;
}

