* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: linear-gradient(145deg, #e0eafc 0%, #cfdef3 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

/* @import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap"); */

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #6366f1; border-radius: 10px; }

/* ---------- CONTAINER ---------- */
.container {
    /* max-width: 1400px; */
    max-width: 85%;
    margin: 0 auto;
    flex-grow: 1;
    padding: 0 1.5rem;
}

/* ---------- MAIN LAYOUT ---------- */
.main-wrapper {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.navbar {
    padding: 40px 0px;
}
/* SIDEBAR NAVIGATION */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    border-radius: 32px;
    padding: 1.5rem 0;
    border: 1px solid rgba(255,255,255,0.4);
    height: fit-content;
    position: sticky;
    top: 1rem;
}
.sidebar-brand {
    padding: 0 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}
.sidebar-brand h3 {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #e2e8f0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-item {
    margin-bottom: 0.25rem;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem 0.3rem!important;
    color: #1e293b;
    text-decoration: none;
    transition: 0.2s;
    font-weight: 500;
    border-radius: 40px;
    margin: 0 0.5rem;
    font-size: 13px!important;
}
.nav-link:hover {
    background: rgba(255,255,255,0.5);
    /* transform: translateX(4px); */
}
.nav-link.active {
    background: rgba(99,102,241,0.2);
    font-weight: 700;
}
.user-info-sidebar {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.85rem;
}

@media screen and (min-resolution: 1.09dppx) and (max-resolution: 1.16dppx) {
    /* CSS for ~110% zoom */
    .navbar {
        padding: 30px 0px;
    }
    .text-dark,
    .navbar-nav .nav-link {
        gap: 0.25rem;
        padding: 0.75rem 0.3rem!important;
        font-size: 12px!important;
    }
}
@media screen and (min-resolution: 1.22dppx) and (max-resolution: 1.28dppx) {
    /* CSS for ~125% zoom */
    .navbar {
        padding: 25px 0px;
    }
    .text-dark,
    .navbar-nav .nav-link {
        gap: 0.25rem;
        padding: 0.75rem 0.3rem!important;
        font-size: 11px!important;
    }

    .container {
        max-width: 90%;
    }
}
@media screen and (min-resolution: 1.45dppx) and (max-resolution: 1.55dppx) {
    /* CSS for ~150% zoom */
    .navbar {
        padding: 20px 0px;
    }
    .text-dark,
    .navbar-nav .nav-link {
        gap: 0.15rem;
        padding: 0.75rem 0.3rem!important;
        font-size: 10px!important;
    }

    .container {
        max-width: 97%;
    }
    .top-boxes .col-md-3 .glass-card h3 {
        font-size: 20px;
    }
}

@media screen and (min-resolution: 1.70dppx) and (max-resolution: 1.80dppx) {
     /* CSS for ~175% zoom */
    .navbar {
        padding: 20px 0px;
    }
    .text-dark,
    .navbar-nav .nav-link {
        gap: 0.15rem;
        padding: 0.35rem 0.2rem!important;
        font-size: 8px!important;
    }

    .container {
        max-width: 98%;
    }
    .top-boxes .col-md-3 .glass-card p {
        font-size: 14px;
    }
    .top-boxes .col-md-3 .glass-card h3 {
        font-size: 18px;
    }
}


.user-role {
    background: rgba(99,102,241,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    display: inline-block;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    min-width: 0;
}

/* ---------- GLASS CARD ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1.5rem;
    transition: 0.2s;
}
.glass-card:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ---------- STATS CARDS ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    border-radius: 28px;
    padding: 1.2rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.4);
}
.stat-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-card p {
    margin: 0;
    font-weight: 500;
    opacity: 0.8;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 40px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    text-align: center;
    justify-content: center;
}
.btn-outline-danger {
    /* padding: 0.6rem 0rem!important; */
}
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: #1e293b;
}
.btn-sm {
    padding: 0.25rem 0.8rem;
    font-size: 0.75rem;
}
.btn-block {
    width: 100%;
    justify-content: center;
}

/* ---------- FORMS ---------- */
.form-group {
    margin-bottom: 1rem;
}
.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
}
.form-control, .form-select {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 48px;
    font-family: inherit;
}
.form-control:focus, .form-select:focus {
    outline: none;
    background: white;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}

/* ---------- TABLES ---------- */
.table-wrapper {
    overflow-x: auto;
    border-radius: 24px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0!important;
    overflow: auto;
}
th, td {
    padding: 1rem 0.9rem!important;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(255, 255, 255, 0.15)!important;
    backdrop-filter: blur(14px);
    vertical-align: middle;
    white-space: nowrap;
}
th {
    background: rgba(255,255,255,0.3);
    font-weight: 600;
}
tr:hover {
    background: rgba(255,255,255,0.2);
}

/* ---------- ALERTS ---------- */
.alert {
    padding: 0.8rem 1.2rem;
    border-radius: 48px;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
}
.alert-success { background: rgba(16,185,129,0.85); color: white; }
.alert-danger { background: rgba(239,68,68,0.85); color: white; }
.alert-info { background: rgba(99,102,241,0.85); color: white; }

/* ---------- LOGIN PAGE ---------- */
.login-card {
    max-width: 460px;
    margin: 12vh auto;
    padding: 2rem;
}

/* ---------- UTILITIES ---------- */
.text-center { text-align: center; }
.text-muted { color: rgba(0,0,0,0.6); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.w-100 { width: 100%; }
.small { font-size: 0.85rem; }


.modal-dialog {
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-boxes {
    display: flex!important;
}
.top-boxes .col-md-3 {
    width: calc(100% / 4)!important;
}
.top-boxes .col-md-3 .glass-card h3 {
    font-weight: 900;
}


.productsGridFull {
    display: flex;
    flex-wrap: wrap;
}
.productsGridFull .col-md-6 {
    width: 100%!important;
    max-width: 100%!important;
}
.productsGridFull .col-md-6 .glass-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.productsGridFull .col-md-6 .glass-card .cardimg,
.productsGridFull .col-md-6 .glass-card img {
    min-width: 70px!important;
    width: 70px!important;
    height: 70px!important;
    object-fit: cover;
    font-size: 10px;
}
.productsGridFull .col-md-6 .glass-card .mb-2,
.productsGridFull .col-md-6 .glass-card .form-check,
.productsGridFull .col-md-6 .glass-card .mt-2,
.productsGridFull .col-md-6 .glass-card .cardimg,
.productsGridFull .col-md-6 .glass-card img,
.productsGridFull .col-md-6 .glass-card h5 {
  margin-top: 0!important;
  margin-bottom: 0!important;
}
.productsGridFull .col-md-6 .glass-card h5 {
    width: 200px;
    margin-right: auto;
    font-size: 18px;
}
.productsGridFull .col-md-6 .glass-card .child-qty .input-group {
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 50px;
}
.productsGridFull .col-md-6 .glass-card .child-qty {
    display: flex;
    flex-direction: column;
    align-items: flex-start!important;
    text-align: left;
}
.productsGridFull .col-md-6 .glass-card .child-total {
    width: 200px;
}

.sidebar-view + .container  {
    margin-top: 30px;
}

.sidebar-view {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: -18%;
    top: 0;
    z-index: 1;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    height: 100%;
    width: 18%;
    transition: left 0.3s ease-in-out;
}
.sidebar-view.open {
    left: 0;
    transition: left 0.3s ease-in-out;
}
.sidebar-opener {
    position: absolute;
    border: 1px solid #d4d4d4;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    right: -70px;
    top: 25px;
    background: rgb(255 255 255 / 85%);
    backdrop-filter: blur(100px);
    font-weight: 800;
    border-radius: 100%;
    cursor: pointer;
}
.sidebar-view .navbar-brand {
    padding: 0rem 0.6rem!important;
    height: 70px;
}
.sidebar-view .container {
    flex-direction: row;
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0 20px;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: initial!important;
    align-items: initial!important;
}
.sidebar-view .container div#navbarNav {
    width: 100%;
    flex-wrap: wrap;
    flex-grow: 1;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: column;
    height: calc(100% - 70px);
}

.sidebar-view .container div#navbarNav .navbar-nav  {
    flex-direction: column;
    width: 100%;
}




@media screen and (min-width: 168px) and (max-width: 500px) {


    .sidebar-view + .container  {
        margin-top: 30px;
        max-width: 90%;
    }
    .sidebar-view .navbar-toggler {
        display: none
    }
    .sidebar-view .collapse:not(.show) {
        display: flex!important;
    }
    .sidebar-view {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: -80%;
        top: 0;
        z-index: 1;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(14px);
        height: 100%;
        width: 80%;
        transition: left 0.3s ease-in-out;
    }
    .sidebar-view.open {
        left: 0;
        transition: left 0.3s ease-in-out;
    }
    .sidebar-opener {
        width: 50px;
        height: 50px;
        right: -75px;
        top: 22px;
        cursor: pointer;
    }
    .sidebar-view .navbar-brand {
        padding: 0rem 0.6rem!important;
        height: 70px;
    }
    .sidebar-view .container {
        flex-direction: row;
        display: flex;
        width: 100%;
        margin: 0;
        padding: 0 20px;
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: initial!important;
        align-items: initial!important;
    }
    .sidebar-view .container div#navbarNav {
        width: 100%;
        flex-wrap: wrap;
        flex-grow: 1;
        align-items: flex-start;
        justify-content: space-between;
        flex-direction: column;
        height: calc(100% - 70px);
    }

    .sidebar-view .container div#navbarNav .navbar-nav  {
        height: 85%;
        overflow: auto;
    }

    .sidebar-view + .container > .d-flex {
        justify-content: space-between !important;
        height: 35px;
    }

    .sidebar-view + .container > .d-flex > h2 {
        padding-left: 50px;
        margin-bottom: 0;
        font-size: 14px;
    }
    .sidebar-view + .container > .d-flex {
        flex-direction: row;
        align-items: center !important;
    }
    .sidebar-view + .container > .d-flex > h2 + a {
        white-space: nowrap;
        margin-left: 20px;
        font-size: 12px;
        width: auto;
        margin-top: 0;
    }
    .mobilebar {
        flex-wrap: nowrap!important;
        overflow: auto;
    }
    .mobilebar a {
        white-space: nowrap!important;
    }
    .h4, h4, .h5, h5 {
        font-size: 14px;
    }
    
    .mob-wrap {
        flex-wrap: wrap;
    }
    .mob-wrap .col-4 {
        width: 50%;
    }
    .mob-wrap .col-4:nth-child(3) {
        width: 100%;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .table {
        display: table!important;
    }
    .h2, h2 {
        font-size: 20px!important;
    }
    #productsGrid .col-md-6 {
        width: calc(100% / 3)!important;
        max-width: 100%!important;
    }
    #productsGrid.productsGridFull .col-md-6 {
        width: calc(100% / 1)!important;
        max-width: 100%!important;
    }
    .modal-dialog {
        max-width: 100%;
        margin-right: auto;
        margin-left: auto;
        transform: scale(0.6)!important;
    }
    .productsGridFull {
        display: flex;
        flex-wrap: wrap;
    }
    .productsGridFull .col-md-6 {
        width: 100%!important;
        max-width: 100%!important;
    }
    .productsGridFull .col-md-6 .glass-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    .productsGridFull .col-md-6 .glass-card .cardimg,
    .productsGridFull .col-md-6 .glass-card img {
        min-width: 50px!important;
        width: 50px!important;
        height: 50px!important;
        object-fit: cover;
        font-size: 10px;
    }
    .productsGridFull .col-md-6 .glass-card .mt-2 {
        font-size: 10px;
    }
    .productsGridFull .col-md-6 .glass-card input,
    .productsGridFull .col-md-6 .glass-card .mb-2 label,
    .productsGridFull .col-md-6 .glass-card .mt-2 label {
        font-size: 12px!important;
    }
    .productsGridFull .col-md-6 .glass-card .mb-2,
    .productsGridFull .col-md-6 .glass-card .form-check,
    .productsGridFull .col-md-6 .glass-card .mt-2,
    .productsGridFull .col-md-6 .glass-card .cardimg,
    .productsGridFull .col-md-6 .glass-card img,
    .productsGridFull .col-md-6 .glass-card h5 {
        margin-top: 0!important;
        margin-bottom: 0!important;
    }
    .productsGridFull .col-md-6 .glass-card h5 {
        width: 200px;
        margin-right: auto;
        font-size: 14px;
    }
    .productsGridFull .col-md-6 .glass-card h5 span {
        font-size: 12px!important;
    }
    .productsGridFull .col-md-6 .glass-card .child-qty .input-group {
        border: 1px solid rgba(0,0,0,0.2);
        border-radius: 50px;
    }
    .productsGridFull .col-md-6 .glass-card .child-qty {
        display: flex;
        flex-direction: column;
        align-items: flex-start!important;
        text-align: left;
    }
    .productsGridFull .col-md-6 .glass-card .child-total {
        width: 200px;
    }
}

/* Responsive */
@media (max-width: 992px) {
    table {
        display: table!important;
    }
    .box-on-tablet {
        width: calc(100% / 3)!important;
    }
   
    .box-on-tablet-full {
        width: 100%!important;
    }

    .box-on-tablet p {
        font-size: 10px;
    }
    .box-on-tablet h5 {
        font-size: 16px;
    }
    .box-on-tablet small {
        font-size: 10px;
    }
    .navbar-nav + div {
        text-align: right;
    }
    .navbar-nav + div a br {
        display: none;
    }
    .productsGridFull .col-md-6 .glass-card label {
        font-size: 12px!important;
    }
    .productsGridFull .col-md-6 .glass-card h5 {
        font-size: 14px;
    }
    .productsGridFull .col-md-6 .glass-card .child-total,
    .productsGridFull .col-md-6 .glass-card h5 span {
        font-size: 10px!important;
    }
    .modal.show .modal-dialog {
        margin: 0 auto;
    }
    .box-on-tablet-full .glass-card,
    .box-on-tablet .glass-card {
        margin-bottom: 20px!important;
    }

    .main-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 1rem;
    }
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .nav-link {
        padding: 0.5rem 1rem;
    }
    .user-info-sidebar {
        display: none;
    }
    .modal-dialog {
        margin: 0 30px;
    }
    .navbar-nav .nav-link {
        padding: 0.6rem 0rem!important;
        margin: 0!important;
    }
    td, th {
        padding: 0.7rem 0.7rem !important;
        font-size: 13px;
    }
    .top-boxes .col-md-3 {
        width: calc(100% / 2)!important;
        flex-grow: 1;
    }
    .top-boxes .col-md-3 .glass-card {
        padding: 1rem;
    }
    .top-boxes .col-md-3 .glass-card h3 {
        font-size: 16px;
        font-weight: 900;
    }
    .top-boxes .col-md-3 .glass-card p {
        font-size: 12px;
        font-weight: 400;
    }
    .top-boxes .col-md-3 .glass-card .investment-breakdown {
        font-size: 10px!important;
    }
    .btn {
       font-size: 0.65rem; 
    }
    .container {
        /* max-width: 1400px; */
        max-width: 95%;
        padding: 0 0.6rem;
    }
    .navbar {
        padding: 25px 0px;
    }
}
@media screen and (min-width: 568px) and (max-width: 1900px) {
    .table,
    table.table {
        display: table!important;
    }
}

@media screen and (min-width: 168px) and (max-width: 480px) {
    .pagination {
        width: 85%;
        margin: 0 auto;
        overflow: auto;
    }

    .box-on-tablet {
        width: calc(100% / 2)!important;
    }
    .box-on-tablet:nth-child(4) {
        width: 100%!important;
    }
   
    .box-on-tablet-full {
        width: 100%!important;
    }

    .box-on-tablet p {
        font-size: 10px;
    }
    .box-on-tablet h5 {
        font-size: 16px;
    }
    .box-on-tablet small {
        font-size: 10px;
    }
    .productsGridFull .col-md-6 .glass-card  {
        justify-content: flex-start;
        align-items: center;
        flex-wrap: wrap;
    }

}


@media screen and (min-width: 501px) and (max-width: 786px) {
    .sidebar-view + .container  {
        margin-top: 30px;
        max-width: 95%;
    }
    .sidebar-view + .container > .d-flex {
        justify-content: space-between !important;
        height: 35px;
    }
    .sidebar-view + .container > .d-flex > h2 {
        padding-left: 50px;
        margin-bottom: 0;
    }
    .sidebar-opener {
        width: 50px;
        height: 50px;
        right: -75px;
        top: 22px;
        cursor: pointer;
    }
    .sidebar-view .navbar-toggler {
        display: none
    }
    .sidebar-view .collapse:not(.show) {
        display: flex!important;
    }
    .sidebar-view {
        left: -50%;
        width: 50%!important;
    }
    
}