
/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  :root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --secondary: #f9fafb;
    --background: #f9fafb;
    --foreground: #1f2937;
    --border: #e5e7eb;
    --card: #ffffff;
    --muted: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--foreground);
    background-color: var(--background);
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
  }
  
  /* Layout */
  .layout {
    display: flex;
    min-height: 100vh;
  }
  
  /* Sidebar */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    width: 16rem;
    height: 100vh;
    background-color: white;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
  }
  
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  
  .logo {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(to right, #4338ca, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  
  .sidebar-nav {
    flex: 1;
    padding: 1.5rem 0.75rem;
    overflow-y: auto;
  }
  
  .sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.2s, color 0.2s;
  }
  
  .sidebar-link i {
    margin-right: 0.75rem;
  }
  
  .sidebar-link.active {
    background-color: #f3f4f6;
    color: var(--primary);
  }
  
  .sidebar-link:hover:not(.active) {
    background-color: #f9fafb;
  }
  
  .sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
  }
  
  .sidebar-settings {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    background: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .sidebar-settings i {
    margin-right: 0.75rem;
  }
  
  .sidebar-settings:hover {
    background-color: #f9fafb;
  }
  
  /* Main Container */
  .main-container {
    flex: 1;
    margin-left: 16rem;
    display: flex;
    flex-direction: column;
  }
  
  /* Header */
  .header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    padding: 0 1.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
  }
  
  .search-box {
    position: relative;
    width: 100%;
    max-width: 24rem;
  }
  
  .search-box i {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
  }
  
  .search-box input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    font-size: 0.875rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    transition: all 0.2s;
  }
  
  .search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  }
  
  .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .notification-btn {
    position: relative;
    padding: 0.5rem;
    color: #6b7280;
    background: none;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .notification-btn:hover {
    background-color: #f3f4f6;
  }
  
  .notification-indicator {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #ef4444;
    border-radius: 50%;
  }
  
  .user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: rgba(79, 70, 229, 0.1);
    border-radius: 50%;
  }
  
  .user-avatar i {
    color: var(--primary);
  }
  
  .user-name {
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  /* Main Content */
  .main-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
  }
  
  .dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
  }
  

  
  .dashboard-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.25rem;
  }
  
  .dashboard-subtitle {
    color: var(--muted);
  }
  
  /* Data Cards */
  .data-cards {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
  }
  
  @media (min-width: 640px) {
    .data-cards {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (min-width: 1024px) {
    .data-cards {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  
  .data-card {
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .data-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
  }
  
  .data-card-header i {
    color: var(--muted);
  }
  
  .data-card-value {
    display: flex;
    align-items: baseline;
  }
  
  .data-value {
    font-size: 1.5rem;
    font-weight: 600;
  }
  
  .data-trend {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
  }
  
  .data-trend.positive {
    color: #10b981;
  }
  
  .data-trend.negative {
    color: #ef4444;
  }
  
  /* Dashboard Grid */
  .dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  /* Full width for reviews panel */
  .reviews-panel {
    grid-column: 1 / -1;
  }
  
  .orders-panel, .products-panel, .reviews-panel {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow);
  }

  /* Rating Stars */
  .rating-stars {
    display: flex;
    gap: 0.125rem;
  }

  .rating-stars .star {
    font-size: 1rem;
    color: #d1d5db;
  }

  .rating-stars .star.filled {
    color: #fbbf24;
  }
  
  .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
  }
  
  .panel-title {
    font-size: 1.125rem;
    font-weight: 500;
  }
  
  .view-all-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: var(--foreground);
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .view-all-btn:hover {
    background-color: #f9fafb;
  }
  
  /* Orders Table */
  .table-container {
    overflow-x: auto;
    position: relative;
  }
  
  .orders-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .orders-table th {
    padding-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .orders-table td {
    padding: 0.75rem 1rem 0.75rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
  }
  
  .status-badge.pending {
    background-color: #fef3c7;
    color: #92400e;
  }
  
  .status-badge.processing {
    background-color: #dbeafe;
    color: #1e40af;
  }
  
  .status-badge.completed {
    background-color: #d1fae5;
    color: #065f46;
  }
  
  .status-badge.cancelled {
    background-color: #f3f4f6;
    color: #1f2937;
  }
  
  .action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--foreground);
    background: none;
    border: none;
    cursor: pointer;
  }
  
  .action-btn:hover {
    text-decoration: underline;
  }
  
  /* Products List */
  .products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
  }
  
  .product-icon i {
    color: #6b7280;
  }
  
  .product-info {
    flex: 1;
    min-width: 0;
  }
  
  .product-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .product-sold {
    font-size: 0.75rem;
    color: var(--muted);
  }
  
  .product-price {
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  /* Mobile menu toggle button */
  .mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 40;
    padding: 0.5rem;
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--foreground);
  }
  
  .mobile-menu-toggle:hover {
    background-color: var(--secondary);
  }
  
  .mobile-menu-toggle:active {
    transform: scale(0.95);
  }
  
  /* Responsive styles */
  @media (max-width: 768px) {
    .mobile-menu-toggle {
      display: flex;
    }
    
    .sidebar {
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      z-index: 35;
    }
    
    .sidebar.active {
      transform: translateX(0);
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .main-container {
      margin-left: 0;
      width: 100%;
    }
    
    .header {
      padding: 0 1rem 0 3.5rem; /* Add left padding for menu button */
      margin-left: 0;
      min-height: 4rem;
      align-items: center;
    }
    
    .search-box {
      max-width: calc(100% - 120px); /* Leave space for header actions */
      margin-right: 0.5rem;
    }
    
    .user-name {
      display: none;
    }
    
    .main-content {
      padding: 1rem;
      width: 100%;
      overflow-x: hidden;
    }
    
    .dashboard {
      padding: 0;
    }
    
    .dashboard-header {
      padding: 0 0.5rem;
    }
    
    .dashboard-title {
      font-size: 1.5rem;
    }
    
    .dashboard-subtitle {
      font-size: 0.875rem;
    }
    
    .data-cards {
      grid-template-columns: repeat(2, 1fr);
      gap: 0.75rem;
    }
    
    .data-card {
      padding: 1rem;
    }
    
    .data-value {
      font-size: 1.25rem;
    }
    
    .dashboard-grid {
      gap: 1rem;
    }
    
    .orders-panel, .products-panel, .reviews-panel {
      padding: 1rem;
      border-radius: 0.5rem;
    }
    
    .panel-title {
      font-size: 1.125rem;
    }
    
    .panel-header {
      margin-bottom: 1rem;
    }
    
    .table-container {
      margin: 0 -1rem;
      padding: 0 1rem;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    
    .orders-table {
      font-size: 0.8125rem;
      width: 100%;
    }
    
    .orders-table td {
      padding: 0.5rem 0.5rem 0.5rem 0;
    }
    
    .status-badge {
      padding: 0.25rem 0.5rem;
      font-size: 0.6875rem;
    }
    
    .product-item {
      gap: 0.75rem;
    }
    
    .product-icon {
      width: 2.5rem;
      height: 2.5rem;
    }
    
    .action-btn {
      background-color: var(--primary);
      color: white;
      padding: 0.375rem 0.75rem;
      border-radius: 0.25rem;
    }
    
    .action-btn:hover {
      background-color: var(--primary-dark);
      text-decoration: none;
    }
  }
  
  @media (max-width: 640px) {
    .data-cards {
      grid-template-columns: 1fr;
    }
    
    .header {
      flex-wrap: wrap;
      gap: 0.5rem;
      padding: 0.5rem 0.5rem 0.5rem 3rem;
      min-height: auto;
      position: relative;
    }
    
    .header-actions {
      gap: 0.5rem;
      flex-shrink: 0;
    }
    
    .search-box {
      flex: 1 1 150px;
      min-width: 0;
      order: 2;
      width: 100%;
      max-width: 100%;
      margin-top: 0.5rem;
    }
    
    .search-box input {
      font-size: 0.75rem;
      padding: 0.375rem 0.75rem 0.375rem 2rem;
    }
    
    /* Make table scrollable horizontally */
    .table-container {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    
    .orders-table {
      min-width: 500px;
    }
    
    /* Hide less important columns on mobile */
    .hide-mobile {
      display: none;
    }
    
    .orders-table th,
    .orders-table td {
      padding: 0.5rem 0.25rem;
      font-size: 0.75rem;
    }
    
    .action-btn {
      padding: 0.25rem 0.5rem;
      font-size: 0.75rem;
    }
    
    .view-all-btn {
      padding: 0.25rem 0.5rem;
      font-size: 0.75rem;
    }
    
    .dashboard-header {
      text-align: center;
    }
    
    .dashboard-title {
      font-size: 1.125rem;
    }
    
    .dashboard-subtitle {
      font-size: 0.875rem;
    }
    
    .data-card {
      min-height: auto;
    }
    
    .data-card-title {
      font-size: 0.75rem;
    }
    
    .data-value {
      font-size: 1.125rem;
    }
    
    .data-trend {
      font-size: 0.625rem;
    }
  }
  
  /* Extra small devices */
  @media (max-width: 375px) {
    .main-content {
      padding: 0.5rem;
      min-width: 100%;
    }
    
    .dashboard-header {
      padding: 0.5rem;
    }
    
    .data-cards {
      gap: 0.5rem;
    }
    
    .data-card {
      padding: 0.75rem;
    }
    
    .data-card-header {
      gap: 0.5rem;
    }
    
    .data-card-header i {
      display: none;
    }
    
    .orders-panel,
    .products-panel,
    .reviews-panel {
      padding: 0.75rem;
      border-radius: 0.5rem;
    }
    
    .panel-header {
      flex-direction: column;
      gap: 0.5rem;
      align-items: flex-start;
    }
    
    .panel-title {
      font-size: 0.875rem;
    }
    
    .view-all-btn {
      align-self: stretch;
      text-align: center;
    }
    
    /* Stack status badge and action button vertically */
    .orders-table td:last-child {
      text-align: center;
    }
    
    .status-badge {
      display: block;
      margin-bottom: 0.25rem;
    }
  }
  
  /* Animations */
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .animate-fade-in {
    animation: fadeIn 0.3s ease-out;
  }
  
  .animate-fade-up {
    animation: fadeInUp 0.3s ease-out;
    animation-fill-mode: both;
  }
  
  .data-cards .data-card:nth-child(1) {
    animation-delay: 0.1s;
  }
  
  .data-cards .data-card:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  .data-cards .data-card:nth-child(3) {
    animation-delay: 0.3s;
  }
  
  .data-cards .data-card:nth-child(4) {
    animation-delay: 0.4s;
  }
  .data-card{
  border: 1px solid #e5e7eb;

  }
  
  /* Sidebar overlay for mobile */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 25;
    transition: opacity 0.3s ease;
    opacity: 0;
  }
  
  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }
  
  /* Global table responsiveness */
  table {
    min-width: 100%;
    border-collapse: collapse;
  }
  
  /* All table containers should be scrollable */
  .table-responsive,
  .table-container,
  .table-wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    position: relative;
  }
  
  /* Direct table scrolling for tables without wrappers */
  div > table:not(.no-scroll) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Optional: Add visual indicator for scrollable tables */
  @media (max-width: 768px) {
    .table-responsive::after,
    .table-container::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: 30px;
      background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8));
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.3s;
    }
    
    .table-responsive:hover::after,
    .table-container:hover::after {
      opacity: 1;
    }
  }
  