.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #dee2e6;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #dee2e6;
}

.select2 {
    max-width: 100%;
    width: 100%;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.btn-group-xs>.btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}

.select2-container--open {
    z-index: 9999;
}

.searchable-fields {
    padding-left: 5px;
}

.searchable-link {
    padding: 0 5px 0 5px;
}

.searchable-link:hover {
    cursor: pointer;
    background: #eaeaea;
}

.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid~.invalid-feedback {
    display: block;
}

.dataTables_length label select {
    width: 65px !important;
}

div.dt-button-collection {
    padding: 0;
}

.buttons-columnVisibility {
    display: block;
}

.buttons-columnVisibility.active {
    background-color: rgba(128, 128, 128, 0.1);
    font-weight: bolder;
}

/* Sidebar Menu Alignment Fixes */
.nav-sidebar .nav-link {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.nav-sidebar .nav-link .nav-icon {
    margin-right: 0.5rem !important;
    width: 1.2rem !important;
    text-align: center !important;
}

.nav-sidebar .nav-link p {
    margin: 0 !important;
    padding: 0 !important;
}

/* Enhanced Sidebar Menu Styling */
.nav-sidebar .nav-item.has-treeview {
    position: relative;
}

.nav-sidebar .nav-item.has-treeview>.nav-link {
    background: transparent;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-sidebar .nav-item.has-treeview>.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: transparent;
}

.nav-sidebar .nav-item.has-treeview.menu-open>.nav-link {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: transparent;
    color: #ffffff;
}

.nav-sidebar .nav-item.has-treeview>.nav-link.active {
    background: #007bff;
    border-left-color: #03376e;
    color: #ffffff;
    font-weight: 600;
}

/* Submenu Styling */
.nav-sidebar .nav-treeview {
    background: rgba(0, 0, 0, 0.1);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 0.5rem;
    border-radius: 0 4px 4px 0;
    padding: 0.25rem 0;
}

.nav-sidebar .nav-treeview .nav-item {
    position: relative;
}

.nav-sidebar .nav-treeview .nav-link {
    padding-left: 2.5rem !important;
    padding-right: 1rem !important;
    margin: 0.1rem 0.5rem;
    border-radius: 4px;
    background: transparent;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.nav-sidebar .nav-treeview .nav-link::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nav-sidebar .nav-treeview .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: transparent;
    transform: translateX(2px);
}

.nav-sidebar .nav-treeview .nav-link:hover::before {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.2);
}

.nav-sidebar .nav-treeview .nav-link.active {
    background: #007bff;
    border-left-color: #03376e;
    color: #ffffff;
    font-weight: 500;
}

.nav-sidebar .nav-treeview .nav-link.active::before {
    background: #ffffff;
    transform: translateY(-50%) scale(1.3);
}

.nav-sidebar .nav-treeview .nav-link .nav-icon {
    margin-right: 0.75rem !important;
    width: 1rem !important;
    font-size: 0.85rem;
    opacity: 0.8;
}

.nav-sidebar .nav-treeview .nav-link:hover .nav-icon,
.nav-sidebar .nav-treeview .nav-link.active .nav-icon {
    opacity: 1;
}

/* Parent Menu Icon Styling */
.nav-sidebar .nav-item.has-treeview>.nav-link .nav-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}

.nav-sidebar .nav-item.has-treeview>.nav-link:hover .nav-icon,
.nav-sidebar .nav-item.has-treeview>.nav-link.active .nav-icon {
    opacity: 1;
}

/* Dropdown Arrow Styling */
.nav-sidebar .nav-item.has-treeview>.nav-link .right.nav-icon {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    opacity: 0.7;
}

.nav-sidebar .nav-item.has-treeview.menu-open>.nav-link .right.nav-icon {
    transform: rotate(-90deg);
    opacity: 1;
}

/* Enhanced Visual Hierarchy */
.nav-sidebar .nav-item:not(.has-treeview)>.nav-link {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-sidebar .nav-item:not(.has-treeview)>.nav-link:hover {
    border-left-color: transparent;
    background: rgba(255, 255, 255, 0.05);
}

.nav-sidebar .nav-item:not(.has-treeview)>.nav-link.active {
    border-left-color: #03376e;
    background: #007bff;
    color: #ffffff;
    font-weight: 500;
}

/* Smooth Animation for Menu Open/Close */
.nav-sidebar .nav-treeview {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.nav-sidebar .nav-item.has-treeview.menu-open .nav-treeview {
    max-height: 500px;
}

/* Add subtle shadow to submenu */
.nav-sidebar .nav-treeview {
    box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.1);
}

/* Improve spacing and alignment */
.nav-sidebar .nav-treeview .nav-item {
    margin: 0.1rem 0;
}

.nav-sidebar .nav-treeview .nav-link p {
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Brand Logo Fixes */
.brand-link {
    padding: 0.5rem 1rem !important;
}

.brand-image {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
    border: none !important;
}

/* Remove any oval/round styling from brand image */
.brand-image.img-circle {
    border-radius: 0 !important;
}

.brand-image.elevation-3 {
    box-shadow: none !important;
}

/* Sidebar Logo Styling */
.sidebar-logo-container {
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem;
    border-radius: 0.25rem;
}

.sidebar-logo-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Stock Cards Styling */
.stock-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stock-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stock-card.border-success {
    border-color: #28a745 !important;
}

.stock-card.border-warning {
    border-color: #ffc107 !important;
}

.stock-card.border-danger {
    border-color: #dc3545 !important;
}

.stock-quantity {
    font-weight: bold;
    margin: 10px 0;
}

.stock-quantity h3 {
    font-size: 2rem;
    margin-bottom: 0;
}

/* Card Header Styling */
.stock-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.stock-card .card-header h6 {
    font-weight: 600;
    color: #495057;
}

/* Card Body Styling */
.stock-card .card-body {
    padding: 1rem;
}

.stock-card .card-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid #dee2e6;
}

/* Badge Styling */
.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Search and Filter Section */
.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Pagination Styling */
.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stock-card .card-header h6 {
        font-size: 0.9rem;
    }

    .stock-quantity h3 {
        font-size: 1.5rem;
    }

    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .stock-card {
        margin-bottom: 1rem;
    }

    .stock-quantity h3 {
        font-size: 1.25rem;
    }
}

/* Loading Animation */
.stock-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.stock-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Empty State Styling */
.alert-info {
    border: none;
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-info i {
    color: #17a2b8;
}

/* Card Grid Animation */
#stock-cards .col-lg-3,
#stock-cards .col-md-4,
#stock-cards .col-sm-6 {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AdminLTE Theme Consistency - Global Styles */
:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --primary-light: #66b3ff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --sidebar-bg: #343a40;
    --sidebar-active: #007bff;
}

/* Consistent Card Styling */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px 8px 0 0;
}

/* Consistent Button Styling */
.btn {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Consistent Badge Styling */
.badge {
    border-radius: 4px;
    font-weight: 500;
}

/* Consistent Table Styling */
.table {
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    padding: 12px 15px;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transition: all 0.2s ease;
}

/* Override any conflicting AdminLTE table styles */
.table thead th,
.table thead td {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border: none !important;
}

/* Ensure table headers are always visible */
.table thead th {
    background-color: var(--primary-color) !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    text-shadow: none !important;
}

/* Fix for DataTables styling */
.dataTable thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border: none !important;
}

/* Fix for any AdminLTE table overrides */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: white;
}

/* Force table header visibility across all modules */
.table thead th,
.table thead td,
.dataTable thead th,
.dataTable thead td,
table thead th,
table thead td {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    background-color: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}

/* Override any white background on table headers */
.table thead th[style*="background-color: white"],
.table thead th[style*="background: white"],
.dataTable thead th[style*="background-color: white"],
.dataTable thead th[style*="background: white"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Ensure table headers are visible in all contexts */
.content .table thead th,
.content .dataTable thead th,
.card .table thead th,
.card .dataTable thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border: none !important;
}

/* Override AdminLTE table styling that might cause white text on white background */
.table thead th,
.table thead td {
    background-color: var(--primary-color) !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border: none !important;
}

/* Fix for any AdminLTE skin overrides */
.skin-blue .table thead th,
.skin-blue .table thead td,
.sidebar-dark-primary .table thead th,
.sidebar-dark-primary .table thead td {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border: none !important;
}

/* Ensure DataTables headers are visible */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--dark-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--primary-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Consistent Alert Styling */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #ffffff; /* White text will stand out on darker green */
    border: 1px solid #1e7e34; /* Optional: add a darker border */
}


.alert-danger {
    background: linear-gradient(135deg, #ff0015 0%, #f5c6cb 100%);
    color: #ffffff;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Consistent Form Styling */
.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Consistent Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 0 2px;
}

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

.pagination .page-link:hover {
    color: var(--primary-dark);
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Consistent Modal Styling */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
}

/* Enhanced Modern UI Components */
.btn-group .btn {
    border-radius: 0;
    margin-right: 2px;
}

.btn-group .btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-right: 0;
}

/* Enhanced Form Styling */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.form-control {
    transition: all 0.2s ease;
}

.form-control:hover {
    border-color: #ced4da;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Enhanced Button Styling */
.btn {
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced Card Hover Effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Enhanced Table Row Hover */
.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Enhanced Badge Styling */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge-pill {
    border-radius: 50px;
    padding: 0.5rem 1rem;
}

/* Enhanced Alert Styling */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Tooltip Styling */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}

/* Enhanced Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced Focus States */
.btn:focus,
.form-control:focus,
.btn-group .btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .btn-group {
        display: flex;
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 4px !important;
        margin-right: 0 !important;
        margin-bottom: 2px;
    }

    .btn-group .btn:last-child {
        margin-bottom: 0;
    }
}

/* Enhanced Empty State Styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Enhanced Data Table Styling */
.dataTables_wrapper {
    padding: 1rem 0;
}

.dataTables_length,
.dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_length label,
.dataTables_filter label {
    font-weight: 500;
    color: var(--dark-color);
}

.dataTables_filter input {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease;
}

.dataTables_filter input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Enhanced Pagination */
.dataTables_paginate .paginate_button {
    border-radius: 4px !important;
    margin: 0 2px !important;
    transition: all 0.2s ease !important;
}

.dataTables_paginate .paginate_button:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-1px);
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header Shortcut Buttons Styling */
.navbar-nav .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 0.25rem;
}

.navbar-nav .nav-item .nav-link:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.navbar-nav .nav-item .nav-link i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-item .nav-link:hover i {
    transform: scale(1.1);
}

.navbar-nav .nav-item .nav-link span {
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Active state for current page */
.navbar-nav .nav-item .nav-link.active {
    background: var(--primary-color);
    color: white !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .navbar-nav .nav-item .nav-link {
        padding: 0.4rem 0.6rem;
        margin: 0 0.1rem;
    }

    .navbar-nav .nav-item .nav-link i {
        font-size: 1rem;
    }
}

/* Animation for button appearance */
@keyframes fadeInButton {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-nav .nav-item {
    animation: fadeInButton 0.5s ease-out;
}

/* Stagger animation for each button */
.navbar-nav .nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.navbar-nav .nav-item:nth-child(2) {
    animation-delay: 0.2s;
}

.navbar-nav .nav-item:nth-child(3) {
    animation-delay: 0.3s;
}

.navbar-nav .nav-item:nth-child(4) {
    animation-delay: 0.4s;
}

.navbar-nav .nav-item:nth-child(5) {
    animation-delay: 0.5s;
}

.navbar-nav .nav-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* User Profile Dropdown Styling */
#userProfileDropdown {
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    transition: all 0.3s ease;
    border-radius: 6px;
}

#userProfileDropdown:hover {
    background: rgba(0, 123, 255, 0.05);
}

#userProfileDropdown .user-panel {
    margin: 0;
}

#userProfileDropdown .image i {
    transition: all 0.3s ease;
}

#userProfileDropdown:hover .image i {
    transform: scale(1.1);
    color: var(--primary-dark) !important;
}

#userProfileDropdown .info span {
    font-size: 0.9rem;
    line-height: 1.2;
}

#userProfileDropdown .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* User Profile Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0;
    min-width: 250px;
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.dropdown-header strong {
    font-size: 1rem;
    color: var(--dark-color);
}

.dropdown-header small {
    font-size: 0.8rem;
}

.dropdown-header .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
    color: var(--primary-color);
    transform: translateX(3px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.dropdown-item:hover i {
    transform: scale(1.15);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid #e9ecef;
}

/* Responsive Design for User Profile Menu */
@media (max-width: 768px) {
    #userProfileDropdown .info {
        display: none !important;
    }

    #userProfileDropdown {
        padding: 0.5rem;
    }

    .dropdown-menu {
        min-width: 220px;
    }

    .dropdown-header {
        padding: 0.75rem;
    }

    .dropdown-item {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Badge Color Variations */
.badge-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.badge-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

/* Smooth transitions for dropdown toggle */
.dropdown-toggle::after {
    transition: transform 0.3s ease;
}

.dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Enhanced hover effect for logout button */
.dropdown-item:last-child:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    color: var(--danger-color);
}