* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  color: #333;
  overflow-x: hidden;
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-overlay.active {
  display: block;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 70px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.mobile-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.logo i {
  color: #4facfe;
}

.header-nav {
  display: flex;
  gap: 1rem;
}

.header-nav i {
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.header-nav i:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.notification {
  position: relative;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.user-profile img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Main Container */
.main-container {
  display: flex;
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 0;
  overflow-y: auto;
  position: fixed;
  height: calc(100vh - 70px);
  transition: transform 0.3s ease;
  z-index: 998;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  margin-bottom: 2rem;
}

.user-info img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.user-details p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.sidebar-nav {
  padding: 0 1rem;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section h4 {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 1rem;
  padding: 0 1rem;
  letter-spacing: 1px;
}

.nav-section ul {
  list-style: none;
}

.nav-section li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  transition: all 0.3s;
  position: relative;
}

.nav-section li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-section li.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-left: 4px solid #4facfe;
}

.nav-section li i {
  width: 20px;
  text-align: center;
}

.nav-section li span:first-of-type {
  flex: 1;
}

.nav-section li .badge {
  background: #4facfe;
  position: static;
  margin-left: auto;
}

.nav-section li .badge.error {
  background: #ff4757;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  background-color: #f8f9fa;
  transition: margin-left 0.3s ease;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.breadcrumb-left h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.add-widget-btn {
  background: #00d4aa;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.add-widget-btn:hover {
  background: #00b894;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  animation: fadeIn 0.5s ease-out;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-header h3 {
  font-size: 1.2rem;
  color: #333;
}

/* Quick Summary */
.quick-summary {
  grid-column: span 2;
}

.time-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.time-filters button {
  padding: 0.5rem 1rem;
  border: 1px solid #e9ecef;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.time-filters button.active,
.time-filters button:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.chart-container {
  height: 250px;
  margin-bottom: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  padding: 1rem;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100%;
  width: 100%;
  justify-content: space-between;
}

.bar {
  background: linear-gradient(to top, #667eea, #764ba2);
  border-radius: 4px 4px 0 0;
  min-height: 20px;
  flex: 1;
  max-width: 20px;
  animation: growUp 1s ease-out;
}

.chart-labels {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #666;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat i {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.stat:nth-child(1) i {
  background: #667eea;
}

.stat:nth-child(2) i {
  background: #764ba2;
}

.stat:nth-child(3) i {
  background: #4facfe;
}

.stat .value {
  font-size: 1.2rem;
  font-weight: bold;
  display: block;
}

.stat .label {
  font-size: 0.9rem;
  color: #666;
}

/* Metric Cards */
.metric-card {
  text-align: center;
}

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
}

.metric-icon.orders {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.metric-icon.users {
  background: linear-gradient(135deg, #00d4aa, #00b894);
}

.metric-card h3 {
  font-size: 1rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1rem;
}

.metric-progress {
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  transition: width 1s ease-out;
  width: 0%;
}

.metric-progress span {
  font-size: 0.9rem;
  color: #666;
}

/* Revenue Statistics */
.revenue-stats .dropdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #666;
}

.revenue-value {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1rem;
}

.line-chart {
  width: 100%;
  height: 100%;
}

.line-chart svg {
  width: 100%;
  height: 100%;
}

/* Product Tracking */
.tracking-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tracking-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.tracking-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-details strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.item-details span {
  color: #666;
  font-size: 0.8rem;
}

.time {
  color: #4facfe;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Earning Goal */
.goal-charts {
  display: flex;
  gap: 2rem;
  justify-content: space-around;
  flex-wrap: wrap;
}

.goal-chart {
  text-align: center;
  flex: 1;
  min-width: 150px;
}

.circular-progress {
  width: 100px;
  height: 100px;
  position: relative;
  margin: 0 auto 1rem;
}

.circular-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circular-progress circle {
  fill: none;
  stroke-width: 8;
}

.circular-progress circle:first-child {
  stroke: #e9ecef;
}

.circular-progress circle.progress {
  stroke: #667eea;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 1s ease-out;
}

.circular-progress.green circle.progress {
  stroke: #00d4aa;
}

.percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  color: #333;
}

.goal-info span {
  display: block;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.goal-info strong {
  color: #333;
  font-size: 1rem;
}

/* Sales by State */
.map-container {
  text-align: center;
}

.map-placeholder {
  height: 200px;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #666;
}

.map-placeholder i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: #667eea;
}

.map-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-color.blue {
  background: #667eea;
}

.legend-color.light-blue {
  background: #4facfe;
}

.legend-color.gray {
  background: #e9ecef;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes growUp {
  from {
    height: 0;
  }
  to {
    height: var(--height);
  }
}

/* Responsive Design */
@media (max-width: 1400px) {
  .quick-summary {
    grid-column: span 1;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .header-nav {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }

  .summary-stats {
    grid-template-columns: 1fr;
  }

  .goal-charts {
    flex-direction: column;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0.75rem;
  }

  .header-right {
    gap: 0.5rem;
  }

  .lang-text,
  .user-name {
    display: none;
  }

  .main-content {
    padding: 1rem;
  }

  .breadcrumb {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .breadcrumb-left h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .time-filters {
    justify-content: center;
  }

  .time-filters button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .chart-container {
    height: 200px;
  }

  .metric-value {
    font-size: 2rem;
  }

  .revenue-value {
    font-size: 1.5rem;
  }

  .tracking-item {
    padding: 0.75rem;
  }

  .item-details strong {
    font-size: 0.85rem;
  }

  .item-details span {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.5rem;
  }

  .logo span {
    display: none;
  }

  .main-content {
    padding: 0.75rem;
  }

  .card {
    padding: 0.75rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .time-filters {
    width: 100%;
    justify-content: space-between;
  }

  .time-filters button {
    flex: 1;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  .summary-stats {
    gap: 0.75rem;
  }

  .stat {
    gap: 0.75rem;
  }

  .stat i {
    width: 35px;
    height: 35px;
  }

  .stat .value {
    font-size: 1rem;
  }

  .stat .label {
    font-size: 0.8rem;
  }

  .metric-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .metric-value {
    font-size: 1.8rem;
  }

  .circular-progress {
    width: 80px;
    height: 80px;
  }

  .map-placeholder {
    height: 150px;
  }

  .map-placeholder i {
    font-size: 2rem;
  }

  .map-legend {
    gap: 0.5rem;
  }

  .legend-item {
    font-size: 0.8rem;
  }
}

/* Print Styles */
@media print {
  .sidebar,
  .header,
  .mobile-overlay {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
