:root {
  /* Base Colors */
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --secondary: #0ea5e9;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  /* Gradients */
  --primary-gradient: linear-gradient(135deg, #8b5cf6, #6d28d9);
  --blue-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
  --green-gradient: linear-gradient(135deg, #10b981, #059669);
  --purple-gradient: linear-gradient(135deg, #8b5cf6, #7c3aed);
  --orange-gradient: linear-gradient(135deg, #f59e0b, #d97706);
  
  /* Neutral Colors */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-body: #f3f4f6;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Sizes */
  --header-height: 64px;
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  
  /* Z-Index */
  --z-header: 40;
  --z-sidebar: 30;
  --z-modal: 50;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Dark Mode Colors */
[data-theme="dark"] {
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --text-primary: #f9fafb;
  --text-secondary: #e5e7eb;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --bg-light: #1f2937;
  --bg-white: #111827;
  --bg-card: #1f2937;
  --bg-body: #111827;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

* {
    scrollbar-width: thin;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-body);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.125rem;
}

h4 {
  font-size: 1rem;
}

/* Layout Styles */
.page-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  height: 100vh;
}

/* Header Styles */
.header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.header-left, .header-actions {
  display: flex;
  align-items: center;
}

.header-left {
  gap: var(--spacing-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  font-size: 1.125rem;
}

.logo svg {
  color: var(--primary);
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: var(--spacing-xs);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.sidebar-toggle:hover {
  background-color: var(--bg-light);
}

.header-search {
  position: relative;
  margin: 0 auto;
}

.header-search input {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background-color: var(--bg-light);
  width: 300px;
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  color: var(--text-primary);
}

.header-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background: none;
  border: none;
  color: var(--text-secondary);
  position: relative;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.icon-btn:hover {
  background-color: var(--bg-light);
  color: var(--text-primary);
}

.badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--danger);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: var(--spacing-xs);
  border-radius: var(--radius-full);
  margin-left: var(--spacing-sm);
  transition: background-color var(--transition-fast);
}

.profile-btn:hover {
  background-color: var(--bg-light);
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* Sidebar Styles */
.sidebar {
  grid-area: sidebar;
  background-color: var(--bg-white);
  border-right: 1px solid var(--border-color);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  z-index: var(--z-sidebar);
  transition: transform var(--transition-normal), width var(--transition-normal);
}

.sidebar nav {
  padding: var(--spacing-md) 0;
}

.sidebar ul {
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  margin: 0.25rem var(--spacing-md);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.sidebar-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-light);
}

.sidebar-link.active {
  color: var(--primary);
  background-color: rgba(139, 92, 246, 0.1);
}

.sidebar-link.active svg {
  color: var(--primary);
}

/* Main Content Styles */
.main-content {
  grid-area: main;
  padding: var(--spacing-lg);
  overflow-y: auto;
  max-height: calc(100vh - var(--header-height));
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fade-in 0.3s ease-in-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.stats-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.stats-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  color: white;
}

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

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

.stats-card-icon.purple {
  background: var(--purple-gradient);
}

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

.stats-card-info span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.stats-card-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-lg);
}

.dashboard-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  margin-bottom: 0;
}

.card-container {
    padding: var(--spacing-md);
}

.chart-container {
  padding: var(--spacing-md);
  height: 300px;
}

.chart-card {
  grid-row: span 2;
}

.orders-card {
  grid-column: 1 / 3;
}

/* Product List */
.product-list {
  padding: var(--spacing-md);
}

.product-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

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

.product-item-image {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-right: var(--spacing-md);
}

.product-item-info {
  flex: 1;
}

.product-item-name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.product-item-stats {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.product-item-stats span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.product-item-stats .price {
  font-weight: 600;
  color: var(--primary);
}

/* Table Styles */
.orders-table-container {
    padding: 0 var(--spacing-md) var(--spacing-md);
    overflow-x: auto;
}

.orders-table, .data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table th {
        vertical-align: top;
    }

    .orders-table th, .data-table th {
        text-align: left;
        padding: var(--spacing-md);
        font-weight: 600;
        border: none;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-secondary);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        text-align: center;
    }

    .orders-table td, .data-table td {
        padding: 3px var(--spacing-md);
        border: none;
        vertical-align: middle;
    }

    .orders-table tr, .data-table tr {
        border-bottom: 1px solid var(--border-color);
    }

    .orders-table tr:last-child td, .data-table tr:last-child td {
        border-bottom: none;
    }

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
}

    .status-badge.completed {
        background-color: rgba(16, 185, 129, 0.1);
        color: #059669;
    }

    .status-badge.processing {
        background-color: rgba(245, 158, 11, 0.1);
        color: #d97706;
    }

    .status-badge.pending {
        background-color: rgba(59, 130, 246, 0.1);
        color: #2563eb;
    }

    .status-badge.cancelled {
        background-color: rgba(239, 68, 68, 0.1);
        color: #dc2626;
    }

.view-all {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Messages List */
.messages-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.messages-list {
  display: flex;
  flex-direction: column;
}

.message-item {
  display: flex;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.message-item:hover {
  background-color: var(--bg-light);
}

.message-item.unread {
  background-color: rgba(139, 92, 246, 0.05);
}

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

.message-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-md);
  flex-shrink: 0;
}

.message-content {
  flex: 1;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.message-sender {
  font-weight: 600;
  font-size: 0.875rem;
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.message-subject {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.message-preview {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gallery Styles */
.gallery-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.gallery-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.gallery-tab-btn {
  padding: var(--spacing-md) var(--spacing-lg);
  background: none;
  border: none;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.gallery-tab-btn:hover {
  color: var(--text-primary);
}

.gallery-tab-btn.active {
  color: var(--primary);
}

.gallery-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background-color: var(--primary);
}

.gallery-tab-content {
  display: none;
  padding: var(--spacing-lg);
}

.gallery-tab-content.active {
  display: grid;
/*  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--spacing-lg);*/
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.gallery-item-img {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.gallery-item-info {
  padding: var(--spacing-md);
  background-color: var(--bg-card);
}

.gallery-item-location {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.gallery-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gallery-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.gallery-item-actions button {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: none;
  border: none;
  color: var(--text-muted);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.gallery-item-actions .edit-btn:hover {
  color: var(--primary);
  background-color: rgba(139, 92, 246, 0.1);
}

.gallery-item-actions .delete-btn:hover {
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.media-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.media-item-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.media-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--spacing-md);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.media-item:hover .media-item-overlay {
  opacity: 1;
}

.media-item-title {
  font-weight: 600;
  font-size: 0.875rem;
  align-self: flex-start;
  margin-top: auto;
}

.media-item-actions {
  align-self: flex-end;
}

.media-item-actions button {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  transition: background-color var(--transition-fast);
}

.media-item-actions button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* User/Admin Lists */
.users-container, .admin-users-container, .products-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  padding: var(--spacing-md);
}

.user-avatar, .admin-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.user-name, .admin-name {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.25rem;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  transition: background-color var(--transition-fast);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 0.875rem;
  width: 0.875rem;
  left: 0.1875rem;
  bottom: 0.1875rem;
  background-color: white;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast);
}

input:checked + .switch-slider {
  background-color: var(--success);
}

input:checked + .switch-slider:before {
  transform: translateX(1.25rem);
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: none;
  border: none;
  color: var(--text-muted);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.btn-icon.edit:hover {
  color: var(--primary);
  background-color: rgba(139, 92, 246, 0.1);
}

.btn-icon.delete:hover {
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.btn-outline {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  z-index: var(--z-modal);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  margin-bottom: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.close-modal:hover {
  color: var(--danger);
}

.modal-body {
  padding: var(--spacing-lg);
}

/* Form Styles */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  padding-right: 2rem;
}

.form-section-title {
  margin: var(--spacing-lg) 0 var(--spacing-md);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

/* Image Upload Area */
.image-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.image-upload-area:hover {
  border-color: var(--primary);
}

.image-upload-area svg {
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

.image-upload-area p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.image-preview-area {
  margin-top: var(--spacing-md);
  position: relative;
}

.image-preview-area img {
  width: 100%;
  border-radius: var(--radius-md);
  max-height: 200px;
  object-fit: contain;
}

.remove-image-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: white;
  color: var(--danger);
  border: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-fast);
}

.remove-image-btn:hover {
  background-color: var(--danger);
  color: white;
}

/* Notifications */
.notification-list {
  display: flex;
  flex-direction: column;
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}

.notification-item:hover {
  background-color: var(--bg-light);
}

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

.notification-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xs);
}

.notification-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.notification-icon.info {
  background-color: var(--info);
}

.notification-icon.success {
  background-color: var(--success);
}

.notification-icon.danger {
  background-color: var(--danger);
}

.notification-icon.warning {
  background-color: var(--warning);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.notification-message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Theme Colors */
.theme-colors {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding: var(--spacing-md) 0;
}

.theme-color-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.theme-color-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.theme-color-btn.active {
  border-color: var(--bg-white);
  box-shadow: 0 0 0 2px var(--primary);
}

/* User Profile Modal */
.user-profile-header {
  display: flex;
  align-items: center;
  padding-bottom: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin-right: var(--spacing-lg);
}

.profile-info h4 {
  margin-bottom: 0.25rem;
}

.profile-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

/* User Details Modal */
.user-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.user-status {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.status-label {
  font-weight: 500;
}

.user-details-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg) var(--spacing-md);
}

.info-group {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.info-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Message Details Modal */
.message-details {
  margin-bottom: var(--spacing-lg);
}

.message-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.message-sender {
  display: flex;
  flex-direction: column;
}

.message-sender span:first-child {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.message-sender span:last-child {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.message-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.message-content {
  line-height: 1.6;
}

/* Hidden Class */
.hidden {
  display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-card, .orders-card {
    grid-column: 1;
  }
}

@media (max-width: 991px) {
  :root {
    --sidebar-width: 220px;
  }
  
  .header-search input {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .page-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  
  .sidebar {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    bottom: 0;
    width: var(--sidebar-width);
    z-index: var(--z-sidebar);
    transition: left var(--transition-normal);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .main-content {
    padding: var(--spacing-md);
  }
  
  .stats-cards {
    gap: var(--spacing-md);
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .filter, .section-header .btn {
    align-self: stretch;
  }
  
  .sidebar-toggle {
    display: flex;
  }
  
  .header-search {
    display: none;
  }
  
/*  .gallery-tab-content.active {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }*/
  
  .gallery-item-img {
    height: 150px;
  }
  
  .orders-table-container, .users-container, .admin-users-container, .products-container {
    overflow-x: auto;
  }
  
  .user-details-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .stats-cards {
    display: flex;
    flex-direction: column;
  }
  
  .gallery-tabs {
    padding-bottom: var(--spacing-xs);
  }
  
  .gallery-tab-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
  }
  
  .gallery-tab-content.active {
    grid-template-columns: 1fr;
  }
  
  .gallery-item-img {
    height: 200px;
  }
  
  .media-grid {
    grid-template-columns: 1fr 1fr;
  }
}
