*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --primary: rgb(49, 173, 255);
    --primary-light: rgb(159, 217, 255);
    --primary-dark: rgb(0, 65, 217);
    --text-color: rgb(0, 0, 0);
    --text-grey-color: rgb(159, 159, 159);
    --text-white-color: rgb(255, 255, 255);
}
a{
    text-decoration: none;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: #f5f6fa;
    padding: 20px;
}

.sidebar {
    width: 260px;
    height: calc(100vh - 40px);
    background: #1e2633;
    color: #bfc8da;
    padding: 25px 20px;
    border-radius: 25px;
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    z-index: 101;
    top: 20px;
    overflow-y: auto;
}

.sidebar>div{
    width: 100%;
}

/* When collapsed */
.sidebar.collapsed {
    margin-left: -280px;
}



.top-navbar.collapsed {
    left: 20px;
}

.main.collapsed {
    margin-left: 0;
}


.logo {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.menu-section {
    font-size: 11px;
    text-transform: uppercase;
    color: #7c8698;
    margin: 18px 0 8px;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    /*padding: 10px 12px;*/
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.menu-list li:hover {
    background: #2a3242;
    color: #ffffff;
}

.menu-list li.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 600;
}

.menu-list li a{
    color: #bfc8da;
    display: flex;
    width: 100%;
    padding: 10px 12px;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.menu-list li.active a{
    color: #fff;
}
.icon {
    font-size: 16px;
    opacity: 0.8;
}

.logo-img{
    width: 100%;
    /* max-width: 70px;
    aspect-ratio: 1/1; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.logo-img img{
    /* width: 100%;
    height: 100%; */
    max-width: 70px;
    aspect-ratio: 1/1;
}


/* TOP NAVBAR */
.top-navbar {
    position: fixed;
    top: 0;
    left: 300px;
    right: 20px;
    top: 20px;
    height: 60px;
    background: #ffffff52;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 100;
}

/* Hamburger */
.hamburger {
    font-size: 22px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}

.hamburger:hover {
    opacity: 1;
}

/* left icons */

.left{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.left .bread-crum{
    display: flex;
    justify-content: center;
    align-items: center;
    
    margin-left: 40px;
    color: var(--text-grey-color);
}

.left .bread-crum span{
    color: var(--text-color);
    font-size: 14px;
}

/* Right icons */
.right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icon {
    position: relative;
    font-size: 20px;
    cursor: pointer;
}

/* Notification Badge */
.badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #3b82f6;
    color: white;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 50%;
}

/* Profile */
.profile-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.profile-wrapper img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.name {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.arrow {
    font-size: 12px;
    opacity: 0.6;
}

/* DROPDOWN MENU */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 50px;
    width: 200px;
    background: white;
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    display: none;
    animation: fadeIn 0.2s ease;
}

.dropdown-menu a{
    text-decoration: none;
}

.dropdown-menu .item {
    padding: 10px 15px;
    font-size: 14px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.dropdown-menu .item:hover {
    background: #f3f4f6;
}

.dropdown-menu .logout {
    border-top: 1px solid #e5e7eb;
    margin-top: 5px;
    padding-top: 12px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}



.sidebar,
.top-navbar {
    transition: 0.3s ease;
}

.main {
    margin-left: 280px;
    margin-top: 70px;
    /* padding: 20px; */
    /* background: white; */
    /* min-height: calc(150vh - 70px); */
    transition: 0.3s;
}

@media (max-width: 1024px){
    .sidebar{
        margin-left: -280px;
        top: 90px;
        height: calc(100vh - 100px);
    }
    .sidebar.scrolled{
        top: 70px;
        height: calc(100vh - 80px);
    }
    .sidebar.collapsed{
        margin-left: 0;
        /* top: 60px; */
    }
    .top-navbar{
        left: 20px;
    }
    .top-navbar.scrolled{
        left: 0;
        border-radius: 0px;
        top: 0;
        right: 0;
    }
    .left .bread-crum{
        display: none;
    }
    /* .top-navbar.collapsed{
        left: 260px
    } */
    .main{
        margin-left: 0px;
    }
}










/* Stats Cards Layout */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Card */
.stat-card {
    background: #ffffff52;
    backdrop-filter: blur(10px);
    border: 1px solid #e5e7eb;
    padding: 22px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: 0.25s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

/* Text Section */
.stat-card .title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin: 0;
}

.stat-card h2 {
    margin: 8px 0;
    font-size: 26px;
    color: #1f2937;
}

.change {
    font-size: 13px;
    margin: 0;
    font-weight: 500;
}

.positive { color: #10b981; }
.negative { color: #ef4444; }

/* Icon Circle */
.stat-card .icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Gradient Colors */
.purple {
    background: linear-gradient(135deg, #7c4dff, #5a2be3);
}

.red {
    background: linear-gradient(135deg, #ff5858, #f44336);
}

.green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.orange {
    background: linear-gradient(135deg, #ffb34d, #f97316);
}


.section{
    display: flex;
    justify-content: space-between;
    /* align-items: center; */
    flex-wrap: wrap;
}



.chart-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 25px;
    flex: 1;
    max-height: 400px;
    /* aspect-ratio: 12/6; */
    max-width: 600px;
    min-width: 300px;
    /* margin-top: 25px; */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chart-card h3 {
    margin: 0;
    font-size: 20px;
    color: #1f2937;
    font-weight: 600;
}

.chart-card .subtitle {
    margin: 6px 0 20px;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Chart Box */
.chart-area {
    background: #ffffff;
    padding: 10px;
    border-radius: 15px;
}

.chart-area canvas {
    width: 100% !important;
    height: 300px !important;
}









/* .wrapper {
  width: 600px;
  height: 400px;
}

.slider {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 100%;
  align-items: center;

  .arrow {
    cursor: pointer;
    width: 50px;

    &:hover {
      opacity: 0.8;
    }   
  }

  .arrow.left{
    font-size: 40px;
  }

  .arrow.right{
    font-size: 40px;
  }

  .container-images {
    position: relative;
    width: 500px;
    min-height: 250px;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    -webkit-box-shadow: 10px 10px 61px -10px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: 10px 10px 61px -10px rgba(0, 0, 0, 0.75);
    box-shadow: 10px 10px 61px -10px rgba(0, 0, 0, 0.75);

    img {
      width: 100%;
      height: 100%;
      position: absolute;
      top: 50%;
      transition-duration: 0.5s;
      transform: translateY(-50%);
    }
  }

  &.right .container-images img {
    left: -100%;
    z-index: -1;

    &.active {
      z-index: 1;
      left: 0;
    }

    &.to_right {
      left: 100%;
    }
  }

  &.left .container-images img {
    right: -100%;
    z-index: -1;

    &.active {
      z-index: 1;
      right: 0;
    }

    &.to_left {
      right: 100%;
    }
  }
} */






/* Header */
.products-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.products-header h2 {
    font-size: 28px;
    font-size: clamp(18px, 5vw, 28px);
    margin: 0;
}

.btn-new {
    padding: 10px 18px;
    background: #000;
    color: white;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

/* Breadcrumb */
.breadcrumb {
    color: #94a3b8;
    margin-bottom: 20px;
    font-size: clamp(12px, 3vw, 16px);
}

/* Box */
.products-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.08);
}

/* Top bar */
.table-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.search-input, #statusFilter, #categoryFilter, #fromDate, #toDate {
    width: 250px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.btn-light {
    padding: 9px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    text-wrap-mode: nowrap;
    justify-content: center;
    align-items: center;
    
}

.top-right {
    display: flex;
    gap: 10px;
}

.filters{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
}

/* Table */
.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.products-table th {
    text-align: left;
    padding: 14px 10px;
    background: #f8fafc;
    font-weight: 600;
    font-size: clamp(12px, 2vw, 14px);
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    text-wrap-mode: nowrap;
}

.products-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: nowrap;
    font-size: clamp(11px, 2vw, 14px);
    text-wrap-mode: nowrap;
}

.products-table tr:hover{
    background: rgb(226, 247, 255);
}

/* Product cell */
.prod {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prod img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
}

/* Status */
.status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.active {
    background: #dcfce7;
    color: #16a34a;
}

.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.deactive {
    background: #fee2e2;
    color: #dc2626;
}

/* Actions */
.actions {
    font-size: 16px;
    cursor: pointer;
    /* display: flex;
    align-items: center; */
    height: 100%;
    justify-content: center;
    gap: 8px;
}

.actions button{
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
}

.actions .edit{
    /* background: rgb(212, 255, 212); */
    color: rgb(7, 137, 5);
}

.actions .view{
    /* background: rgb(202, 232, 255); */
    color: rgb(3, 133, 255);
}
.actions .delete{
    /* background: rgb(255, 228, 228); */
    color: rgb(255, 0, 81);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.pagination p{
    font-size: clamp(12px, 2vw, 14px);
}

.pages {
    display: flex;
    gap: 8px;
}

.btn-page {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
}

.btn-page.active {
    background: #000;
    color: white;
}



@media(max-width: 1024px){
    .products-box {
        overflow-x: auto;
    }
}











/* MODAL BACKDROP */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    padding: 10px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    overflow: auto;
    z-index: 9999;
}

/* MODAL BOX */
.modal-content {
    max-width: 850px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    animation: popIn 0.25s ease;
}

/* Animation */
@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
}

.close-modal {
    font-size: 26px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}
.close-modal:hover {
    opacity: 1;
}

/* Form grid */
.modal-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group.three{
    /* flex: 1; */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}


.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group label{
    font-size: 12px;
    position: absolute;
    top: -8px;
    left: 20px;
    background: white;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group.half {
    grid-column: span 1;
}


.imagePreview{
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    
}

.imagePreview img{
    /* width: 100px; */
    height: 100%;
    border-radius: 10px;
}


/* Inputs */
.modal-form input,
.modal-form select,
.modal-form textarea {
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
}

.modal-form textarea {
    height: 120px;
    resize: none;
}

/* Buttons */
.modal-buttons {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.modal-buttons .cancel {
    padding: 10px 18px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
}

.modal-buttons .save {
    padding: 10px 18px;
    background: #000;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    border: none;
}


/* Responsive: On mobile make them full width */
@media (max-width: 600px) {
    .modal-form {
        grid-template-columns: 1fr;
    }
    .form-group.half {
        grid-column: 1 / -1;
    }
}