:root {
  --primary: #4361ee;
  --primary-light: #3f37c9;
  --secondary: #3a0ca3;
  --success: #4cc9f0;
  --danger: #f72585;
  --warning: #f8961e;
  --info: #4895ef;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --white: #ffffff;
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;

  --darkg: rgb(38, 38, 38);

  /* FOR THE CHART */

  --chtprimary-blue: #0066ff;
  --dark-blue: #0044cc;
  --light-blue: #3399ff;
  --neon-blue: #00f2ff;
  --primary-orange: #ff6600;
  --dark-orange: #cc5200;
  --light-orange: #ff8533;
  --neon-orange: #ff9e00;
  --bg-color: #0a0a12;
  --chtcard-bg: #15151f;
  --text-primary: #ffffff;
  --text-secondary: #b0b0c0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {

  min-height: 100vh;
  background-color: #f5f7fb;
  color: var(--dark);
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100vh;
  position: fixed;
  overflow-y: auto;
  z-index: 100;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-light);
}

.sidebar-header h3 {
  color: var(--primary);
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-header h3 {
  display: none;
}

.sidebar-menu {
  padding: 15px 0;
}

.sidebar-menu h4 {
  padding: 10px 20px;
  color: var(--gray);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-menu h4 {
  display: none;
}

.sidebar-menu ul {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 5px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--dark);
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.sidebar-menu a:hover {
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--primary);
}

.sidebar-menu a.active {
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.sidebar-menu i {
  margin-right: 10px;
  font-size: 18px;
  min-width: 20px;
}

.sidebar.collapsed .sidebar-menu a span {
  display: none;
}

.sidebar.collapsed .sidebar-menu a {
  justify-content: center;
  padding: 12px 0;
}

.sidebar.collapsed .sidebar-menu i {
  margin-right: 0;
  font-size: 20px;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: all 0.3s ease;
}

.sidebar.collapsed~.main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* Top Navbar Styles */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
}

.top-navbar-left {
  display: flex;
  align-items: center;
}

.menu-toggle,
.collapse-toggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--dark);
  margin-right: 20px;
  display: none;
}

.collapse-toggle {
  display: block;
}

.collapse-toggle-mobile {
  display: none;
}

.search-bar {
  position: relative;
}

.search-bar input {
  padding: 8px 15px 8px 35px;
  border-radius: 5px;
  border: 1px solid var(--gray-light);
  outline: none;
  width: 250px;
}

.search-bar i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
}

.top-navbar-right {
  display: flex;
  align-items: center;
}

.notification,
.user-profile {
  position: relative;
  margin-left: 20px;
  cursor: pointer;
}

.notification i,
.user-profile i {
  font-size: 20px;
  color: var(--dark);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.user-profile img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
}

/* Content Area Styles */
.content-area {
  padding: 10px;
}

.page-title {
  margin-bottom: 20px;
}

.page-title h2 {
  font-size: 24px;
  color: var(--dark);
}

/* Cards Section */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: var(--white);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.card-icon.blue {
  background: var(--primary);
}

.card-icon.green {
  background: var(--success);
}

.card-icon.orange {
  background: var(--warning);
}

.card-icon.pink {
  background: var(--danger);
}

.card-title {
  font-size: 14px;
  color: var(--gray);
}

.card-value {
  font-size: 24px;
  font-weight: 600;
  margin: 10px 0;
}

.card-footer {
  display: flex;
  align-items: center;
  font-size: 12px;
}

.growth {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.growth.positive {
  color: #28a745;
}

.growth.negative {
  color: #dc3545;
}



/* Previous styles remain the same until the chart section */

/* Advanced Analytics Chart Section */

















.chtbody {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: var(--white);
  color: var(--text-primary);
  padding: 16px;
  overflow-x: hidden;
  min-height: 100vh;
  border-radius: 10px;
  box-shadow: var(--chtcard-bg) 1px 1px 10px; 
  margin: 20px 0;
}

.chtdashboard {
  max-width: 1400px;
  margin: 0 auto;
}

.chtheader {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
  .chtheader {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.chttitle {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--neon-blue), var(--chtprimary-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.5px;
  text-align: center;
}

@media (min-width: 768px) {
  .chttitle {
    font-size: 28px;
    text-align: left;
  }
}

.time-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  /* Firefox */
}

.time-selector::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

@media (min-width: 480px) {
  .time-selector {
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .time-selector {
    justify-content: flex-end;
  }
}

.time-btn {
  background: var(--chtcard-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.time-btn.active {
  background: var(--chtprimary-blue);
  color: white;
  border-color: var(--chtprimary-blue);
}

.chtdashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .chtdashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.chtcard {
  background: var(--dark);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.chtcard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--chtprimary-blue), var(--neon-blue));
}

.chtcard-chtheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chtcard-chttitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .chtcard-chttitle {
    font-size: 18px;
  }
}

.chtcard-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
  background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (min-width: 768px) {
  .chtcard-value {
    font-size: 32px;
  }
}

.chtcard-chtgrowth {
  display: flex;
  align-items: center;
  font-size: 13px;
}

.chtgrowth-positive {
  color: #00ff88;
}

.chtgrowth-negative {
  color: #ff5555;
}

.chart-container {
  height: 250px;
  position: relative;
}

@media (min-width: 768px) {
  .chart-container {
    height: 300px;
  }
}

.main-chart {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
}

.bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 8%;
  min-width: 24px;
  z-index: 2;
}

.bar {
  width: 80%;
  min-width: 20px;
  max-width: 30px;
  border-radius: 6px 6px 0 0;
  transition: all 0.4s ease;
  position: relative;
  cursor: pointer;
}

.bar-revenue {
  background: linear-gradient(to top, var(--dark-blue), var(--chtprimary-blue));
  box-shadow: 0 0 15px rgba(0, 102, 255, 0.3);
  height: 0;
}

.bar-profit {
  background: linear-gradient(to top, var(--dark-orange), var(--primary-orange));
  box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
  height: 0;
  margin-top: 4px;
}

.bar:hover {
  transform: translateY(-5px);
  opacity: 0.9;
}

.bar-label {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  word-break: break-all;
}

@media (min-width: 480px) {
  .bar-label {
    font-size: 12px;
    word-break: normal;
  }
}

.bar-tooltip {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 45, 0.9);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  min-width: 70px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.bar-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(30, 30, 45, 0.9);
}

.bar:hover .bar-tooltip {
  opacity: 1;
}

.chart-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

.grid-line {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  position: relative;
}

.grid-value {
  position: absolute;
  right: -50px;
  top: -8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
}

.secondary-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 480px) {
  .secondary-charts {
    grid-template-columns: 1fr 1fr;
  }
}

.mini-chart {
  height: 120px;
  position: relative;
}

@media (min-width: 768px) {
  .mini-chart {
    height: 150px;
  }
}

.sparkline {
  width: 100%;
  height: 100%;
  stroke: var(--chtprimary-blue);
  stroke-width: 2;
  fill: none;
}

.sparkline-profit {
  stroke: var(--primary-orange);
}

.sparkline-area {
  fill: url(#sparkline-gradient);
  opacity: 0.2;
}

.sparkline-area-profit {
  fill: url(#sparkline-gradient-profit);
}

.metric-chtcard {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 480px) {
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.metric-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid var(--chtprimary-blue);
}

.metric-item.profit {
  border-left-color: var(--primary-orange);
}

.metric-chttitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.metric-value {
  font-size: 16px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .metric-value {
    font-size: 18px;
  }
}

.metric-change {
  font-size: 11px;
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.change-icon {
  margin-right: 4px;
  width: 10px;
  height: 10px;
}

.analytics-chtcard {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .analytics-chtcard {
    grid-column: span 2;
  }
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 480px) {
  .analytics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .analytics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.analytics-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.analytics-value {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  background: linear-gradient(90deg, var(--neon-blue), var(--chtprimary-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (min-width: 768px) {
  .analytics-value {
    font-size: 24px;
  }
}

.analytics-chttitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(0, 102, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
  }
}

.glow {
  filter: drop-shadow(0 0 8px var(--chtprimary-blue));
}

.glow-orange {
  filter: drop-shadow(0 0 8px var(--primary-orange));
}

/* Loading animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--chtprimary-blue);
  animation: spin 1s ease-in-out infinite;
}

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














/* Orders Table */
.orders-table {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 20px;
  overflow-x: auto;

  width: 100%;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.table-header h3 {
  font-size: 18px;
}

.table-actions button {
  padding: 8px 15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
}

th {
  font-weight: 600;
  color: var(--gray);
  font-size: 14px;
}

tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

.status {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status.completed {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.status.pending {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.status.processing {
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

.status.cancelled {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* Action Dropdown */
.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-size: 16px;
  position: relative;
}

.action-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--white);
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 120px;
  z-index: 10;
  display: none;
}

.action-dropdown.show {
  display: block;
}

.action-dropdown button {
  display: block;
  width: 100%;
  padding: 8px 15px;
  text-align: left;
  background: none;
  border: none;
  color: var(--dark);
  cursor: pointer;
  font-size: 14px;
}

.action-dropdown button:hover {
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary);
}

.action-dropdown button i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
}

.action-container {
  position: relative;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    position: fixed;
    z-index: 100;
    top: 0;
    bottom: 0;
    left: 0;
  }

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

  .sidebar.collapsed {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }

  .top-navbar {
    width: 100%;
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .search-bar input {
    width: 200px;
  }

  .collapse-toggle {
    display: none;
  }

  .collapse-toggle-mobile {
    display: block;
  }

}

@media (max-width: 768px) {
  .card {
    width: 100%;
  }

  .search-bar input {
    width: 150px;
  }
}

@media (max-width: 576px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .search-bar {
    width: 150px;
  }
}