:root {
    --primary-color: #0D2A80;
    --primary-hover: #081C5C;
    --primary-light: #e6ebfa;
    --sidebar-bg: #0b1f5c;
    --sidebar-text: #d2dcf7;
    --sidebar-active: #0D2A80;
}

body {
    background-color: #f4f6fa;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* Primary buttons and links */
.bg-primary-theme {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

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

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Sidebar styling */
.admin-sidebar {
    width: 250px;
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    overflow-y: auto;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s ease;
    z-index: 1000;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar for sidebar */
.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}
.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 767.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100vh;
        z-index: 1040;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
    }
}

.admin-sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    border-radius: 6px;
    margin: 2px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 6px rgba(13, 42, 128, 0.4);
}

.admin-sidebar .nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Topbar header */
.admin-topbar {
    background-color: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    height: 60px;
}

/* Page Loader */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner-theme {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* Form focus indicators */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 42, 128, 0.25);
}

/* SweetAlert custom styling overrides */
.swal2-confirm.swal2-styled {
    background-color: var(--primary-color) !important;
}

.swal2-confirm.swal2-styled:focus {
    box-shadow: 0 0 0 3px rgba(13, 42, 128, 0.4) !important;
}

/* Status badges */
.badge-active {
    background-color: #198754;
    color: #fff;
}

.badge-inactive {
    background-color: #dc3545;
    color: #fff;
}

/* Theme Bootstrap 5 Pagination */
.pagination {
    margin-bottom: 0;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.pagination .page-link {
    color: var(--primary-color);
    box-shadow: none !important;
}

.pagination .page-link:hover {
    color: var(--primary-hover);
    background-color: var(--primary-light);
}

/* Hide duplicate right-side "Showing X to Y of Z results" text in pagination component */
nav p.small.text-muted,
nav div > p.small,
nav .small.text-muted {
    display: none !important;
}
