/* Modern Minimalist Design */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #f8f9fa;
    --sidebar-width: 220px;
    --header-height: 60px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Base Styles */
body {
    font-family: var(--font-family);
    font-size: 0.875rem;
    background-color: var(--body-bg);
    margin: 0;
    padding: 0;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: white;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    text-decoration: none;
}

.sidebar .nav {
    padding: 0.5rem 0;
}

.sidebar .nav-item {
    margin: 0;
}

.sidebar .nav-link {
    padding: 0.75rem 1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(13, 110, 253, 0.05) !important;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 1rem;
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

/* Navbar */
.top-navbar {
    height: var(--header-height);
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 99;
}

.navbar-brand {
    font-weight: 600;
    color: var(--dark-color);
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-item {
    margin-left: 1rem;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
}



.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Cards */
.card {
    background-color: white;
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
}

.card-body {
    padding: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    text-decoration: none;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
}

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

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

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

.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

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

.btn-light:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Forms */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: white;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--dark-color);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: var(--secondary-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75em;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    color: white;
    background-color: var(--primary-color);
}

.badge-secondary {
    color: white;
    background-color: var(--secondary-color);
}

.badge-success {
    color: white;
    background-color: var(--success-color);
}

.badge-danger {
    color: white;
    background-color: var(--danger-color);
}

.badge-warning {
    color: var(--dark-color);
    background-color: var(--warning-color);
}

.badge-info {
    color: var(--dark-color);
    background-color: var(--info-color);
}

.badge-light {
    color: var(--dark-color);
    background-color: var(--light-color);
}

.badge-dark {
    color: white;
    background-color: var(--dark-color);
}

/* Utilities */
.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

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

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.mr-3 {
    margin-right: 1rem !important;
}

.ml-auto {
    margin-left: auto !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.p-0 {
    padding: 0 !important;
}

.p-3 {
    padding: 1rem !important;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state-text {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

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

.spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1050;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
    }

    .top-navbar {
        left: 0;
    }

    .content-container {
        padding-top: calc(var(--header-height) + 1rem);
    }
}

/* Sidebar overlay for mobile */
@media (max-width: 768px) {
    .sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: none;
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .sidebar.show::before {
        opacity: 1;
    }
}

/* Hamburger button */
#sidebar-toggle {
    border: none;
    background: transparent;
    color: var(--dark-color);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out;
}

#sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

#sidebar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Custom Components */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

/* Dropdown */
.dropdown {
    position: relative;
}

/* Filters */
.filter-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

/* Pagination */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 0.25rem;
}

.page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: var(--secondary-color);
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--primary-color);
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.page-link:hover {
    z-index: 2;
    color: #0056b3;
    text-decoration: none;
    background-color: #e9ecef;
    border-color: rgba(0, 0, 0, 0.1);
}

.page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Sidebar Dropdown Animation */
.sidebar .fa-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar .fa-chevron-down.rotate {
    transform: rotate(180deg);
}
.dropdown-item, .dropdown-menu {
    font-size: inherit;
}
.badge {
    color: #fff;
}
.breadcrumb {
    padding: 0;
    margin-bottom: 0;
    background-color: #fff;
}
@media (max-width: 576px) {
    .hide-mobile {
        display: none !important;
    }
}
.select2-container .select2-choice {
    border: unset;
    height: 32px;
    line-height: 32px;
}
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx) {
    .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
        background-size: 60px 55px !important;
    }
}

.select2-container + select {
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
}
.table th,
.table td
{
    padding: 0.21rem;
}
.qty-container input {
    min-width: 60px;
}
.qty-container button {
    /* font-size: 5px !important; */
    padding: 3px 2px !important;
}
.table-responsive {
    overflow: unset;
}
table .dropdown-menu.show {
    left: unset !important;
    right: 0px !important;
}
.sidebar .nav-link, .sidebar-brand {
    color: #fff;
}
.sidebar {
    background-color: #000;
}
.dataTables_filter {
    text-align: end;
}
.dataTables_filter label,
.dataTables_filter input {
    text-align: start;
}
