/*
* Zahya Store - Dashboard Main Stylesheet
* Version: 1.0
* 
* This file consolidates all dashboard-related styles into a single file
*/

/* Global Dashboard Styles */
body {
  background-color: #151823;
  color: #e2e8f0;
}

.dashboard-section {
  background-color: #151823;
  padding: 0;
  min-height: 100vh;
  margin-bottom: 0;
}

.dashboard-main {
  padding: 25px;
  margin-left: 250px;
  width: calc(100% - 250px);
  margin-top: 70px; /* Added margin to account for fixed navbar */
  min-height: calc(100vh - 70px - 50px); /* Adjusted for navbar and footer */
  transition: all 0.3s ease;
}

/* Custom Dashboard Navbar - Improved */
.dashboard-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: #1e2130;
  border-bottom: 1px solid #2a2f42;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background-color: #6366f1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  margin-right: 10px;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}

.brand-tag {
  font-size: 10px;
  text-transform: uppercase;
  background-color: #6366f1;
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 5px;
  letter-spacing: 0.5px;
}

/* Search Box */
.search-container {
  width: 350px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 40px;
  background-color: #252a3d;
  border: 1px solid #2a2f42;
  border-radius: 8px;
  padding: 0 20px 0 40px;
  color: #e2e8f0;
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-input:focus {
  background-color: #2c3250;
  border-color: #6366f1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-input::placeholder {
  color: #64748b;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 14px;
}

/* Navbar Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.navbar-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #252a3d;
  border: 1px solid #2a2f42;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.navbar-action-btn:hover {
  background-color: #2c3250;
  color: #e2e8f0;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background-color: #ef4444;
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1e2130;
}

.navbar-divider {
  width: 1px;
  height: 30px;
  background-color: #2a2f42;
  margin: 0 10px;
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  background-color: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-dropdown-toggle:hover {
  background-color: #252a3d;
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  overflow: hidden;
}

.user-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name-display {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
  margin-right: 10px;
}

.dropdown-arrow {
  font-size: 12px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.user-dropdown-toggle:hover .dropdown-arrow {
  color: #e2e8f0;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  background-color: #1e2130;
  border: 1px solid #2a2f42;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-user-header {
  padding: 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #2a2f42;
  background-color: #252a3d;
}

.dropdown-user-info {
  margin-left: 10px;
}

.dropdown-user-name {
  display: block;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.dropdown-user-role {
  display: block;
  font-size: 12px;
  color: #64748b;
}

.dropdown-menu-items {
  padding: 10px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: #e2e8f0;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: #252a3d;
}

.dropdown-item-icon {
  width: 20px;
  margin-right: 10px;
  font-size: 14px;
  color: #94a3b8;
}

.dropdown-item:hover .dropdown-item-icon {
  color: #6366f1;
}

.dropdown-divider {
  height: 1px;
  background-color: #2a2f42;
  margin: 10px 0;
}

.text-danger {
  color: #f87171 !important;
}

.text-danger .dropdown-item-icon {
  color: #f87171;
}

/* Dashboard Header */
.dashboard-header {
  background-color: #1e2130;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #2a2f42;
}

.dashboard-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
}

/* Sidebar Styling - Adjusted for Navbar */
.dashboard-sidebar {
  position: fixed;
  top: 70px;
  left: 0;
  height: calc(100vh - 70px);
  width: 250px;
  background-color: #1e2130;
  border-right: 1px solid #2a2f42;
  z-index: 998;
  overflow-y: auto;
}

.dashboard-sidebar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  background-color: transparent;
  border: none;
  box-shadow: none;
}

/* Hide unnecessary sidebar elements */
.dashboard-sidebar-inner::before,
.sidebar-collapse-btn,
.quick-actions-panel {
  display: none !important;
}

/* Sidebar Header Space */
.sidebar-header-space {
  height: 15px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background-color: #6366f1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  margin-right: 10px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}

.logo-badge {
  font-size: 10px;
  text-transform: uppercase;
  background-color: #6366f1;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.5px;
}

/* Navigation Sections */
.sidebar-nav {
  padding: 0;
  flex: 1;
}

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

.nav-section-title {
  text-transform: uppercase;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  padding: 0 20px;
  margin-bottom: 10px;
}

.sidebar-nav .nav-item {
  margin-bottom: 2px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #94a3b8;
  border-radius: 0;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  position: relative;
  overflow: visible;
  font-size: 14px;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background-color: #252a3d;
  color: #fff;
  border-color: transparent;
  transform: none;
}

.sidebar-nav .nav-link.active {
  border-left: 3px solid #6366f1;
}

.sidebar-nav .nav-icon {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  color: #94a3b8;
  font-size: 16px;
}

.sidebar-nav .nav-link:hover .nav-icon,
.sidebar-nav .nav-link.active .nav-icon {
  color: #6366f1;
}

.sidebar-nav .nav-text {
  font-size: 14px;
}

.sidebar-nav .nav-badge {
  position: absolute;
  right: 15px;
  background-color: #6366f1;
  color: white;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logout Button */
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid #2a2f42;
}

.btn-theme-logout {
  background-color: #252a3d;
  color: #e2e8f0;
  border: 1px solid #2a2f42;
  border-radius: 8px;
  font-size: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-theme-logout:hover {
  background-color: #6366f1;
  border-color: #6366f1;
  color: white;
}

/* Enhanced Card Styles */
.card-base {
  background-color: #1e2130;
  border-radius: 12px;
  border: 1px solid #2a2f42;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #6366f1, #4f46e5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-base:hover::before {
  opacity: 1;
}

.card-base:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Activity Cards */
.activity-card {
  background-color: #1e2130;
  border-radius: 12px;
  border: 1px solid #2a2f42;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.activity-card-header {
  padding: 18px 20px;
  border-bottom: 1px solid #2a2f42;
  background: linear-gradient(to right, #252a3d, #1e2130);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activity-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.activity-card-icon {
  color: #6366f1;
}

.activity-card-link {
  color: #6366f1;
  font-size: 13px;
  font-weight: 500;
}

.activity-card-body {
  padding: 0;
}

/* Activity List Styling */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #2a2f42;
  transition: all 0.2s ease;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background-color: rgba(99, 102, 241, 0.05);
}

.activity-item-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #252a3d;
  border: 1px solid #2a2f42;
}

.activity-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-item-img-placeholder,
.ticket-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  font-size: 20px;
}

.activity-item-content {
  flex: 1;
  min-width: 0;
}

.activity-item-title {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item-details {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: #94a3b8;
}

.activity-item-details i {
  font-size: 11px;
  margin-right: 4px;
  opacity: 0.8;
}

.activity-item-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.activity-item-action {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #252a3d;
  color: #94a3b8;
  transition: all 0.2s ease;
  border: 1px solid #2a2f42;
}

.activity-item:hover .activity-item-action {
  background-color: #6366f1;
  color: white;
}

/* Empty State */
.activity-empty {
  padding: 50px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.activity-empty-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #252a3d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #64748b;
  margin-bottom: 15px;
}

.activity-empty-text {
  color: #94a3b8;
  font-size: 15px;
  margin-bottom: 20px;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-badge.status-completed,
.status-badge.status-paid {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.status-pending {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.status-cancelled {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.status-open {
  background-color: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-badge.status-closed {
  background-color: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.status-badge.status-in_progress,
.status-badge.status-processing {
  background-color: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Action Buttons */
.btn-primary {
  background-color: #6366f1;
  border-color: #6366f1;
}

.btn-primary:hover {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

.btn-outline-secondary {
  color: #94a3b8;
  border-color: #2a2f42;
}

.btn-outline-secondary:hover {
  background-color: #252a3d;
  color: #fff;
  border-color: #2a2f42;
}

.btn-outline-secondary.active {
  background-color: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

/* Enhanced Stats Cards */
.stats-card {
  background-color: #1e2130;
  border-radius: 12px;
  border: 1px solid #2a2f42;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stats-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 25%;
  height: 100%;
  background: linear-gradient(to left, rgba(99, 102, 241, 0.05), rgba(99, 102, 241, 0));
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stats-card:hover::after {
  opacity: 1;
}

.stats-card-body {
  padding: 20px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.stats-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 15px;
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.stats-card:hover .stats-icon {
  transform: scale(1.1);
}

.stats-info {
  flex: 1;
}

.stats-title {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-number {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  transition: all 0.3s ease;
}

.stats-card:hover .stats-number {
  color: #a5b4fc;
}

/* Enhanced Chart Container */
.chart-container {
  background-color: #1e2130;
  border-radius: 12px;
  border: 1px solid #2a2f42;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 20px;
  height: 300px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #6366f1, #4f46e5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chart-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.chart-container:hover::before {
  opacity: 1;
}

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

.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.chart-legend {
  display: flex;
  gap: 15px;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #94a3b8;
}

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

/* Custom Dashboard Footer - Minimal Design */
.dashboard-footer {
  position: relative;
  height: 50px;
  margin-top: 40px;
  border-top: 1px solid #2a2f42;
  background-color: #1e2130;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.copyright {
  color: #64748b;
  font-size: 12px;
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: #2a2f42;
}

.footer-link {
  color: #64748b;
  font-size: 12px;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: #6366f1;
  text-decoration: none;
}

/* Hide original footer on dashboard pages */
.main-footer,
footer:not(.dashboard-footer) {
  display: none !important;
}

/* Ensure dropdown stays above content */
.dropdown-menu {
  z-index: 1050;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #2a2f42;
  border-radius: 6px;
}

/* Mobile Sidebar Toggle */
#sidebarToggle {
  display: none;
}

/* Dashboard Overlay */
.dashboard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.dashboard-overlay.show {
  display: block;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
  /* Adjust navbar for mobile */
  .dashboard-navbar {
    padding: 0 15px;
  }
  
  .navbar-center {
    display: none;
  }
  
  /* Adjust sidebar for mobile */
  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    top: 70px;
    z-index: 1000;
  }
  
  .dashboard-sidebar.show {
    transform: translateX(0);
  }
  
  /* Adjust main content for mobile */
  .dashboard-main {
    margin-left: 0;
    width: 100%;
    padding: 20px 15px;
  }
  
  /* Mobile sidebar toggle button */
  #sidebarToggle {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #6366f1;
    color: white;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }
  
  /* Adjust footer for mobile */
  .dashboard-footer {
    margin-top: 30px;
  }
  
  .footer-content {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
  }
}

/* Small mobile devices */
@media (max-width: 576px) {
  .navbar-actions {
    gap: 3px;
  }
  
  .navbar-action-btn {
    width: 36px;
    height: 36px;
  }
  
  .user-name-display {
    display: none;
  }
  
  .navbar-divider {
    margin: 0 5px;
  }
}

/* Additional responsive adjustments */
@media (max-width: 767.98px) {
  .dashboard-header {
    padding: 12px 15px;
  }
  
  .dashboard-title {
    font-size: 18px;
  }
  
  .activity-item {
    padding: 12px 15px;
    flex-wrap: wrap;
  }
  
  .activity-item-img {
    width: 40px;
    height: 40px;
  }
  
  .activity-item-content {
    width: calc(100% - 130px);
  }
  
  .activity-item-status {
    margin-top: 10px;
    margin-left: 55px;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (max-width: 575.98px) {
  .dashboard-main {
    padding: 15px;
    padding-top: 20px;
    margin-top: 60px;
  }
  
  .dashboard-navbar {
    height: 60px;
  }
  
  .chart-container {
    padding: 15px;
  }
  
  .activity-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .activity-item-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}