/* Change sidebar menu text size */
/* .sidebar .nav-link p,
.sidebar .nav-treeview .nav-link {
    font-size: 0rem !important;
    color: #000 !important;
} */

/* Change background color for nav-treeview submenu */
/* .sidebar .nav-link p, .sidebar .nav-treeview p{
    font-size: 0.95rem !important;
} */
/* Optional: change icons size */
/* .sidebar .nav-link i {
    font-size: 16px !important;
} */
.sidebar .nav-treeview {
    background-color: #404a69 !important; /* Change to your desired color */
}
.sidebar .nav-treeview p{
    color: #ffffff !important; /* Change to your desired text color */
}
.sidebar .nav-treeview .active p{
    color: #131212 !important; /* Change to your desired active text color */
}

/* Reduce vertical padding for DataTable rows to make rows more compact */
.table.dataTable tbody td,
.table.dataTable tbody th {
    padding: .10rem .5rem;
    white-space: nowrap;
}

/* Slightly reduce header padding */
.table.dataTable thead th,
.table.dataTable thead td {
    padding: .2rem .5rem;
    white-space: nowrap;
}

/* Keep font a bit smaller for compact tables */
.table.table-sm {
    font-size: .6rem;
}

/* Custom cart table styles for POS */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: transparent;
}
.cart-table thead th {
    text-align: left;
    font-weight: 600;
    padding: .45rem .6rem;
    border-bottom: 2px solid rgba(0,0,0,0.06);
    background: rgba(0,0,0,0.03);
}
.cart-table tbody td {
    padding: .45rem .6rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.cart-table tbody tr:nth-child(odd) {
    background: rgba(0,0,0,0.015);
}
.cart-table tbody tr:last-child td {
    border-bottom: none;
}
.cart-table td .form-control {
    height: calc(1.5em + .5rem + 2px);
    padding: .25rem .5rem;
}
.cart-table td:last-child { /* actions column */
    text-align: right;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .cart-table thead th { font-size: .85rem; }
    .cart-table tbody td { font-size: .85rem; padding: .35rem .5rem; }
}

/* Custom items table (purchases) */
.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: transparent;
}
.items-table thead th {
    text-align: left;
    font-weight: 600;
    padding: .4rem .6rem;
    border-bottom: 2px solid rgba(0,0,0,0.06);
    background: rgba(0,0,0,0.02);
}
.items-table tbody td {
    padding: .35rem .6rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.items-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.01); }
.items-table .form-control { height: 34px; padding: 6px 8px; font-size: 13px; }
.items-table td:last-child { text-align: center; white-space: nowrap; }
.items-table .btn-add-medicine, .items-table .btn-remove { width:34px; height:34px; padding:0; }

@media (max-width: 768px) {
    .items-table thead th { font-size: .85rem; }
    .items-table tbody td { font-size: .85rem; padding: .3rem .4rem; }
}

/* Right-align the Actions column (header and cells) */
.table.dataTable tbody td:last-child,
.table.dataTable thead th:last-child {
    text-align: right;
    white-space: nowrap;
}

/* Ensure action buttons don't wrap and align correctly */
.table.dataTable tbody td:last-child .btn {
    margin-left: .15rem;
}

/* .main-sidebar{
    position: fixed !important;
    left: 0 !important;
    height: calc(100vh - var(--main-header-height, 56px)) !important;
    
} */

/* Ensure inner .sidebar fills the aside and can scroll */
/* .main-sidebar .sidebar {
    overflow-y: auto !important;
} */

/* Fixed main header so it stays at the top */
:root {
     --main-header-height: 56px;
}

/* .main-header,
header.main-header,
.navbar.navbar-expand-md {
     position: fixed !important;
     top: 0 !important;
     left: 0 !important;
     right: 0 !important;
     height: var(--main-header-height) !important;
     background: #fff !important;
     box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
} */

/* Ensure navbar contents vertically center within fixed header */
/* .main-header .navbar,
header.main-header .navbar,
.navbar.navbar-expand-md {
     min-height: var(--main-header-height) !important;
} */

/* Offset main content so it doesn't sit under the fixed header */
.content-wrapper {
     padding-top: .1rem !important;
}
.content-wrapper .content-header{
    padding: 1px 6px !important;
}
/* Mobile fallback: remove fixed header to avoid overlapping nav toggler issues */
@media (max-width: 768px) {
     .main-header,
     header.main-header,
     .navbar.navbar-expand-md {
          position: relative !important;
          height: auto !important;
     }

     .content-wrapper,
     .wrapper .content,
     main.py-4,
     main.py-4 > .container {
          padding-top: 0 !important;
     }
}