:root {
  --sidebar-width: 260px;
  --header-height: 70px;
  --primary-color: #0d6efd;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --secondary-color: #6c757d;
  --accent-color: #6f42c1;
  --bg-color: #f5f6f8;
  --surface-color: #ffffff;
  --border-color: #e6e8ee;
  --text-muted: rgba(33, 37, 41, 0.6);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.10);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.10);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: #212529;
  overflow-x: hidden;
}

[data-bs-theme="dark"] body {
  background-color: #1a1d21;
  color: #dee2e6;
}

html[data-bs-theme="dark"] {
  --bg-color: #1a1d21;
  --surface-color: #212529;
  --border-color: #343a40;
  --text-muted: rgba(222, 226, 230, 0.65);
}

.text-muted {
  color: var(--text-muted) !important;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface-color);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 1000;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .sidebar {
  background: #212529;
  border-right-color: #343a40;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color);
}

[data-bs-theme="dark"] .sidebar-header {
  border-bottom-color: #343a40;
}

.sidebar-header i {
  font-size: 1.5rem;
}

.sidebar-nav {
  padding: 20px 0;
}

.nav-section {
  margin-bottom: 25px;
}

.nav-section-title {
  padding: 8px 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(33, 37, 41, 0.55);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(33, 37, 41, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

[data-bs-theme="dark"] .nav-item {
  color: #adb5bd;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.35);
  color: var(--accent-color);
  border-left-color: var(--accent-color);
}

[data-bs-theme="dark"] .nav-item:hover {
  background-color: #343a40;
}

.nav-item.active {
  background-color: rgba(111, 66, 193, 0.18);
  color: var(--accent-color);
  border-left-color: var(--accent-color);
  font-weight: 600;
}

.nav-item i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.nav-item .nav-chevron {
  margin-left: auto;
  opacity: 0.7;
  font-size: 0.9rem;
}

.nav-submenu {
  padding: 4px 0 6px 0;
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 42px;
  color: rgba(33, 37, 41, 0.75);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

[data-bs-theme="dark"] .nav-subitem {
  color: rgba(173, 181, 189, 0.95);
}

.nav-subitem:hover {
  background-color: rgba(111, 66, 193, 0.08);
  color: var(--accent-color);
  border-left-color: rgba(111, 66, 193, 0.55);
}

[data-bs-theme="dark"] .nav-subitem:hover {
  background-color: rgba(111, 66, 193, 0.16);
}

.nav-subitem.active {
  background-color: rgba(111, 66, 193, 0.14);
  color: var(--accent-color);
  border-left-color: var(--accent-color);
  font-weight: 600;
}

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: all 0.3s ease;
}

.top-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(245, 246, 248, 0.9);
  border-bottom: 1px solid var(--border-color);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
}

[data-bs-theme="dark"] .top-header {
  background: #212529;
  border-bottom-color: #343a40;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sidebar-toggle {
  font-size: 1.5rem;
  color: rgba(33, 37, 41, 0.75);
}

[data-bs-theme="dark"] .sidebar-toggle {
  color: #adb5bd;
}

.theme-toggle {
  font-size: 1.25rem;
  color: rgba(33, 37, 41, 0.75);
  transition: all 0.2s ease;
}

[data-bs-theme="dark"] .theme-toggle {
  color: #adb5bd;
}

.theme-toggle:hover {
  color: var(--accent-color);
}

.user-profile {
  position: relative;
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
 display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  color: white;
  font-weight: 600;
  font-size: 16px;
  border: 2px solid var(--accent-color);
}

.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #28a745;
  border: 2px solid var(--border-color);
  border-radius: 50%;
}

[data-bs-theme="dark"] .online-indicator {
  border-color: #212529;
}

.dashboard-content {
  padding: 30px;
}

.welcome-card {
  background: var(--surface-color);
  border: none;
  border-radius: 12px;
  color: #212529;
  box-shadow: var(--shadow-sm);
}

.welcome-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.welcome-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

.revenue-section {
  text-align: right;
}

.revenue-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.revenue-amount {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--accent-color);
}

.btn-view-sales {
  background: var(--accent-color);
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-view-sales:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: #5f37ab;
  color: #fff;
}

.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0;
  background: var(--surface-color);
  color: #212529;
}

[data-bs-theme="dark"] .card {
  background: #212529;
  color: #dee2e6;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(33, 37, 41, 0.9);
}

[data-bs-theme="dark"] .card-title {
  color: #dee2e6;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.screenshot-actions {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-action-btn {
  border: 1px solid rgba(111, 66, 193, 0.55);
  background: transparent;
  color: rgba(111, 66, 193, 0.95);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1;
}

.quick-action-btn:hover {
  background: rgba(111, 66, 193, 0.12);
  border-color: rgba(111, 66, 193, 0.75);
  color: rgba(111, 66, 193, 1);
}

.quick-action-btn:focus-visible {
  outline: 2px solid rgba(111, 66, 193, 0.45);
  outline-offset: 2px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.action-btn i {
  font-size: 1.75rem;
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.22);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.75rem;
}

.stat-primary {
  background: rgba(111, 66, 193, 0.15);
}

.stat-primary .stat-icon {
  background: #6f42c1;
  color: #fff;
}

.stat-success {
  background: rgba(40, 167, 69, 0.15);
}

.stat-success .stat-icon {
  background: #28a745;
  color: #fff;
}

.stat-danger {
  background: rgba(220, 53, 69, 0.15);
}

.stat-danger .stat-icon {
  background: #dc3545;
  color: #fff;
}

.stat-info {
  background: rgba(23, 162, 184, 0.15);
}

.stat-info .stat-icon {
  background: #17a2b4;
  color: #fff;
}

.stat-warning {
  background: rgba(255, 193, 7, 0.15);
}

.stat-warning .stat-icon {
  background: #ffc107;
  color: #212529;
}

.stat-secondary {
  background: rgba(108, 117, 125, 0.15);
}

.stat-secondary .stat-icon {
  background: #6c757d;
  color: #fff;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: rgba(33, 37, 41, 0.9);
}

[data-bs-theme="dark"] .stat-value {
  color: #dee2e6;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(33, 37, 41, 0.55);
  font-weight: 500;
}

.site-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.site-stat-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .site-stat-item {
  background: #343a40;
}

.site-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.site-stat-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.75rem;
}

.site-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(33, 37, 41, 0.9);
}

[data-bs-theme="dark"] .site-stat-value {
  color: #dee2e6;
}

.site-stat-label {
  font-size: 0.875rem;
  color: rgba(33, 37, 41, 0.55);
  font-weight: 500;
}

.chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  margin-bottom: 20px;
}

.chart-box {
  height: 220px;
}

.chart-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: rgba(33, 37, 41, 0.75);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .table thead th {
  color: rgba(222, 226, 230, 0.75);
}

.table tbody td {
  border-top: 1px solid rgba(230, 232, 238, 0.7);
}

[data-bs-theme="dark"] .table tbody td {
  border-top-color: rgba(52, 58, 64, 0.8);
}

.list-group-item {
  border-color: var(--border-color);
}

[data-bs-theme="dark"] .list-group-item {
  background: #212529;
  color: #dee2e6;
}

.list-group-item-action:hover {
  background-color: rgba(111, 66, 193, 0.06);
}

[data-bs-theme="dark"] .list-group-item-action:hover {
  background-color: rgba(111, 66, 193, 0.14);
}

.btn-primary {
  --bs-btn-bg: var(--accent-color);
  --bs-btn-border-color: var(--accent-color);
  --bs-btn-hover-bg: #5f37ab;
  --bs-btn-hover-border-color: #5f37ab;
  --bs-btn-active-bg: #56319f;
  --bs-btn-active-border-color: #56319f;
}

.btn-outline-secondary {
  --bs-btn-border-color: rgba(33, 37, 41, 0.2);
  --bs-btn-color: rgba(33, 37, 41, 0.8);
}

[data-bs-theme="dark"] .btn-outline-secondary {
  --bs-btn-border-color: rgba(222, 226, 230, 0.25);
  --bs-btn-color: rgba(222, 226, 230, 0.85);
}

.form-control,
.form-select {
  border-color: rgba(33, 37, 41, 0.15);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  border-color: rgba(222, 226, 230, 0.15);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(111, 66, 193, 0.65);
  box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.18);
}

[data-bs-theme="dark"] .chart-placeholder {
  background: #343a40;
}

.chart-placeholder i {
  font-size: 3rem;
  color: rgba(33, 37, 41, 0.35);
  margin-bottom: 10px;
}

.chart-placeholder p {
  margin: 0;
  color: #95a5a6;
  font-size: 0.875rem;
}

.daily-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #f1f3f6;
  border-radius: 8px;
}

[data-bs-theme="dark"] .summary-item {
  background: #343a40;
}

.summary-item span {
  color: #95a5a6;
  font-size: 0.875rem;
}

.summary-item strong {
  color: #212529;
  font-weight: 600;
}

[data-bs-theme="dark"] .summary-item strong {
  color: #dee2e6;
}

.thumbs-up-illustration {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.footer-section {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}

.footer-text {
  color: #95a5a6;
  font-size: 0.875rem;
  margin: 0;
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

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

  .welcome-content {
    flex-direction: column;
    text-align: center;
  }

  .revenue-section {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .dashboard-content {
    padding: 20px;
  }

  .welcome-title {
    font-size: 1.5rem;
  }

  .revenue-amount {
    font-size: 1.5rem;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .site-stats {
    grid-template-columns: 1fr;
  }
}
