:root {
  --primary-color: #ff6b6b;
  --secondary-color: #f9ca24;
  --dark-color: #1a1d29;
  --light-color: #f5f6fa;
  --border-color: #e0e0e0;
  --text-color: #2d3436;
  --text-light: #7c8fa3;
  --success-color: #00b894;
  --danger-color: #ff6348;
  --warning-color: #ffa502;
  --info-color: #0984e3;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #ff5252 100%);
  --gradient-success: linear-gradient(135deg, var(--success-color) 0%, #00a280 100%);
  --gradient-warning: linear-gradient(135deg, var(--warning-color) 0%, #ff8c00 100%);
  --gradient-dark: linear-gradient(135deg, var(--dark-color) 0%, #2d3436 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f6fa 0%, #ffffff 100%);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.admin-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f8f9fc;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: 260px;
  background: var(--gradient-dark);
  color: white;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  transition: var(--transition);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-header {
  padding: 25px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-header h1 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.5px;
}

.toggle-sidebar {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  padding: 8px;
  border-radius: 6px;
}

.toggle-sidebar:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
  flex: 1;
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-item {
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition);
  border-left: 4px solid transparent;
  font-weight: 500;
  font-size: 14px;
  margin: 0 10px;
  border-radius: 6px;
  position: relative;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  padding-left: 24px;
}

.menu-item.active {
  background: var(--gradient-primary);
  color: white;
  border-left-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.menu-item i {
  font-size: 18px;
  min-width: 25px;
  text-align: center;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.logout-btn {
  width: 100%;
  padding: 12px 15px;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255, 99, 72, 0.3);
}

.logout-btn:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 99, 72, 0.4);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8f9fc;
}

.top-header {
  background: white;
  padding: 20px 30px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  gap: 20px;
}

.header-left h2 {
  font-size: 28px;
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}

.search-bar input {
  padding: 12px 16px 12px 45px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  width: 100%;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: white;
  font-weight: 500;
}

.search-bar input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 12px rgba(255, 107, 107, 0.1);
  background: #fafbfc;
}

.search-bar i {
  position: absolute;
  left: 16px;
  color: var(--text-light);
  font-size: 16px;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 15px;
  background: #f5f6fa;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.admin-profile:hover {
  background: #f0f1f5;
}

.admin-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.admin-info span {
  font-weight: 700;
  color: var(--text-color);
  font-size: 14px;
}

.admin-info small {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.admin-avatar {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==================== CONTENT WRAPPER ==================== */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  scroll-behavior: smooth;
}

.content-wrapper::-webkit-scrollbar {
  width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.content-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.page-section {
  display: none;
  animation: fadeInUp 0.4s ease-out;
}

.page-section.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== DASHBOARD GRID ==================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.stat-card:hover::before {
  left: 100%;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.stat-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.stat-content h3 {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.stat-card small {
  font-size: 12px;
  color: var(--success-color);
  font-weight: 600;
}

.stat-icon {
  width: 75px;
  height: 75px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-left: 20px;
  position: relative;
  z-index: 1;
}

.stat-card:nth-child(1) .stat-icon {
  background: linear-gradient(135deg, rgba(0, 184, 148, 0.15) 0%, rgba(0, 184, 148, 0.05) 100%);
  color: var(--success-color);
}

.stat-card:nth-child(2) .stat-icon {
  background: linear-gradient(135deg, rgba(255, 180, 0, 0.15) 0%, rgba(255, 180, 0, 0.05) 100%);
  color: var(--warning-color);
}

.stat-card:nth-child(3) .stat-icon {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(255, 107, 107, 0.05) 100%);
  color: var(--primary-color);
}

.stat-card:nth-child(4) .stat-icon {
  background: linear-gradient(135deg, rgba(9, 132, 227, 0.15) 0%, rgba(9, 132, 227, 0.05) 100%);
  color: var(--info-color);
}

/* ==================== CARDS ==================== */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 25px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
}

.card-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.3px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.filter-select {
  padding: 10px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  background: white;
  font-weight: 500;
  color: var(--text-color);
}

.filter-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 8px rgba(255, 107, 107, 0.1);
}

.filter-select:hover {
  border-color: var(--primary-color);
}

.card-body {
  padding: 25px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.metric:hover {
  padding-left: 8px;
}

.metric:last-child {
  border-bottom: none;
}

.metric span {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
}

.metric strong {
  font-size: 18px;
  color: var(--text-color);
  font-weight: 700;
}

/* ==================== TABLES ==================== */
.table-responsive {
  overflow-x: auto;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead {
  background: linear-gradient(135deg, #f9fafb 0%, #f5f6fa 100%);
}

table th {
  padding: 16px 15px;
  text-align: left;
  font-weight: 700;
  color: var(--text-light);
  font-size: 12px;
  border-bottom: 2px solid var(--border-color);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

table td {
  padding: 16px 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-color);
}

table tbody tr {
  transition: var(--transition);
}

table tbody tr:hover {
  background-color: #f9fafb;
}

.status-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-pending {
  background: linear-gradient(135deg, rgba(255, 165, 2, 0.15) 0%, rgba(255, 165, 2, 0.05) 100%);
  color: var(--warning-color);
}

.status-confirmed {
  background: linear-gradient(135deg, rgba(9, 132, 227, 0.15) 0%, rgba(9, 132, 227, 0.05) 100%);
  color: var(--info-color);
}

.status-preparing {
  background: linear-gradient(135deg, rgba(242, 112, 156, 0.15) 0%, rgba(242, 112, 156, 0.05) 100%);
  color: #f27098;
}

.status-delivered {
  background: linear-gradient(135deg, rgba(0, 184, 148, 0.15) 0%, rgba(0, 184, 148, 0.05) 100%);
  color: var(--success-color);
}

.status-cancelled {
  background: linear-gradient(135deg, rgba(255, 99, 72, 0.15) 0%, rgba(255, 99, 72, 0.05) 100%);
  color: var(--danger-color);
}

/* ==================== BUTTONS ==================== */
.btn-primary {
  padding: 12px 24px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-success {
  background: var(--gradient-success);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.btn-danger {
  background: var(--danger-color);
  box-shadow: 0 4px 12px rgba(255, 99, 72, 0.3);
}

.btn-danger:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 99, 72, 0.4);
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 165, 2, 0.3);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 165, 2, 0.4);
}

.btn-info {
  background: var(--info-color);
  color: white;
  box-shadow: 0 4px 12px rgba(9, 132, 227, 0.3);
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(9, 132, 227, 0.4);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: rgba(255, 107, 107, 0.1);
}

/* ==================== FORMS ==================== */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text-color);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  background: white;
  font-weight: 500;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 12px rgba(255, 107, 107, 0.1);
  background: #fafbfc;
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control textarea {
  resize: vertical;
  min-height: 120px;
}

textarea.form-control {
  font-family: inherit;
}

/* ==================== MODALS ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 25px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.3px;
}

.close-modal {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-light);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--transition);
}

.close-modal:hover {
  background: #f5f6fa;
  color: var(--text-color);
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ==================== ANALYTICS ==================== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

/* ==================== BADGES ==================== */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-primary {
  background: rgba(255, 107, 107, 0.15);
  color: var(--primary-color);
}

.badge-success {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success-color);
}

.badge-warning {
  background: rgba(255, 165, 2, 0.15);
  color: var(--warning-color);
}

.badge-danger {
  background: rgba(255, 99, 72, 0.15);
  color: var(--danger-color);
}

.badge-info {
  background: rgba(9, 132, 227, 0.15);
  color: var(--info-color);
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid var(--success-color);
}

.toast.error {
  border-left-color: var(--danger-color);
}

.toast.warning {
  border-left-color: var(--warning-color);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==================== SETTINGS ==================== */
.settings-form {
  max-width: 500px;
}

.setting-group {
  padding: 20px;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }

  .search-bar {
    width: 200px;
  }

  .analytics-grid,
  .reports-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: 0;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-radius: 0;
  }

  .sidebar.active {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .toggle-sidebar {
    display: block !important;
  }

  .main-content {
    width: 100%;
    height: auto;
  }

  .top-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    padding: 15px;
  }

  .header-left {
    width: 100%;
  }

  .header-left h2 {
    font-size: 20px;
  }

  .header-right {
    width: 100%;
    flex-direction: column;
    gap: 15px;
  }

  .search-bar {
    width: 100%;
  }

  .search-bar input {
    width: 100%;
  }

  .admin-profile {
    width: 100%;
  }

  .admin-info {
    align-items: flex-start;
  }

  .content-wrapper {
    padding: 15px;
    overflow-y: auto;
    height: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat-card {
    flex-direction: row;
  }

  .stat-card .stat-icon {
    margin-left: auto;
  }

  .table-responsive {
    font-size: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }

  table {
    min-width: 100%;
  }

  table th,
  table td {
    padding: 12px;
    font-size: 12px;
  }

  table th {
    font-size: 11px;
  }

  .analytics-grid,
  .reports-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .btn-sm {
    padding: 8px 12px;
    font-size: 11px;
    min-height: 32px;
  }

  .btn-primary,
  .btn-danger {
    min-height: 36px;
    padding: 8px 12px;
  }

  .card {
    margin-bottom: 15px;
    border-radius: 10px;
  }

  .card-header {
    padding: 15px;
  }

  .card-body {
    padding: 15px;
  }

  .modal-content {
    width: 90% !important;
    max-height: 90vh !important;
    border-radius: 14px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-control {
    padding: 12px 15px;
    font-size: 16px;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .top-header {
    padding: 12px;
  }

  .header-left h2 {
    font-size: 16px;
  }

  .search-bar input {
    width: 100%;
    font-size: 14px;
  }

  .admin-profile {
    gap: 10px;
  }

  .admin-avatar {
    width: 35px;
    height: 35px;
  }

  .admin-info span {
    font-size: 12px;
  }

  .admin-info small {
    font-size: 10px;
  }

  .content-wrapper {
    padding: 10px;
  }

  .card {
    margin-bottom: 12px;
    border-radius: 8px;
  }

  .card-header {
    padding: 12px;
    flex-direction: column;
    gap: 10px;
  }

  .card-header h3 {
    font-size: 16px;
  }

  .card-body {
    padding: 12px;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .stat-content h3 {
    font-size: 12px;
  }

  .stat-value {
    font-size: 28px !important;
  }

  .stat-icon {
    margin-left: 0;
    margin-top: 15px;
    font-size: 28px;
    width: 60px;
    height: 60px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .table-responsive {
    font-size: 11px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: -10px;
    padding: 10px;
  }

  table {
    min-width: 100%;
    font-size: 10px;
  }

  table th {
    font-size: 10px;
    padding: 8px;
  }

  table td {
    padding: 8px;
    font-size: 10px;
  }

  table button {
    padding: 4px 8px !important;
    font-size: 9px !important;
    min-width: 50px;
  }

  .btn-primary,
  .btn-danger,
  .btn-success {
    padding: 10px 15px;
    font-size: 12px;
    min-height: 38px;
    min-width: 38px;
    touch-action: manipulation;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 10px;
    min-height: 30px;
  }

  .metric {
    flex-direction: column;
    gap: 8px;
  }

  .modal-content {
    width: 95% !important;
    max-height: 95vh !important;
    max-width: calc(100vw - 20px) !important;
    border-radius: 12px;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-body {
    padding: 15px;
    max-height: calc(95vh - 130px);
    overflow-y: auto;
  }

  .modal-footer {
    padding: 12px;
    flex-direction: column;
  }

  .modal-footer button {
    width: 100%;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .form-control {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 8px;
  }

  .analytics-grid,
  .reports-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  canvas {
    max-height: 300px !important;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  button,
  a {
    -webkit-tap-highlight-color: transparent;
  }

  .menu-item {
    padding: 12px 15px;
    font-size: 14px;
  }

  .menu-item i {
    font-size: 16px;
  }

  .sidebar-header h1 {
    font-size: 16px;
  }

  .toast {
    width: calc(100% - 40px);
    left: 20px;
    right: auto;
  }
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: 260px;
  background: linear-gradient(135deg, var(--dark-color) 0%, #34495e 100%);
  color: white;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  transition: width 0.3s ease;
}

.sidebar-header {
  padding: 25px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h1 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-sidebar {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-menu {
  flex: 1;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.menu-item {
  padding: 15px 20px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.menu-item.active {
  background-color: var(--primary-color);
  color: white;
  border-left-color: var(--secondary-color);
}

.menu-item i {
  font-size: 18px;
  min-width: 25px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
  width: 100%;
  padding: 12px 15px;
  background-color: var(--danger-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #ff5252;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-header {
  background: white;
  padding: 20px 30px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.header-left h2 {
  font-size: 24px;
  color: var(--text-color);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar input {
  padding: 10px 15px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 250px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.search-bar input:focus {
  border-color: var(--primary-color);
}

.search-bar i {
  position: absolute;
  left: 12px;
  color: #9e9e9e;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.admin-info span {
  font-weight: 600;
  color: var(--text-color);
}

.admin-info small {
  font-size: 12px;
  color: #9e9e9e;
}

.admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==================== CONTENT WRAPPER ==================== */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==================== DASHBOARD GRID ==================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-content {
  flex: 1;
}

.stat-content h3 {
  font-size: 14px;
  color: #7c8fa3;
  margin-bottom: 10px;
  font-weight: 600;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
}

.stat-card small {
  font-size: 12px;
  color: var(--success-color);
}

.stat-icon {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-left: 20px;
}

.stat-card:nth-child(1) .stat-icon {
  background-color: rgba(0, 184, 148, 0.1);
  color: var(--success-color);
}

.stat-card:nth-child(2) .stat-icon {
  background-color: rgba(255, 180, 0, 0.1);
  color: var(--warning-color);
}

.stat-card:nth-child(3) .stat-icon {
  background-color: rgba(255, 107, 107, 0.1);
  color: var(--primary-color);
}

.stat-card:nth-child(4) .stat-icon {
  background-color: rgba(9, 132, 227, 0.1);
  color: var(--info-color);
}

/* ==================== CARDS ==================== */
.card {
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

.card-body {
  padding: 20px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.metric:last-child {
  border-bottom: none;
}

.metric span {
  color: #7c8fa3;
  font-size: 14px;
}

.metric strong {
  font-size: 18px;
  color: var(--text-color);
}

/* ==================== TABLES ==================== */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead {
  background-color: #f9f9f9;
}

table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #7c8fa3;
  font-size: 13px;
  border-bottom: 2px solid var(--border-color);
}

table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

table tbody tr:hover {
  background-color: #f9f9f9;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background-color: rgba(255, 165, 2, 0.1);
  color: var(--warning-color);
}

.status-confirmed {
  background-color: rgba(9, 132, 227, 0.1);
  color: var(--info-color);
}

.status-preparing {
  background-color: rgba(242, 112, 156, 0.1);
  color: #f27098;
}

.status-delivered {
  background-color: rgba(0, 184, 148, 0.1);
  color: var(--success-color);
}

.status-cancelled {
  background-color: rgba(255, 99, 72, 0.1);
  color: var(--danger-color);
}

/* ==================== BUTTONS ==================== */
.btn-primary {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #ff5252;
}

.btn-success {
  background-color: var(--success-color);
}

.btn-success:hover {
  background-color: #00a280;
}

.btn-danger {
  background-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: #ff4733;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==================== FORMS ==================== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-control textarea {
  resize: vertical;
}

textarea.form-control {
  font-family: inherit;
}

/* ==================== MODALS ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.close-modal {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #7c8fa3;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: var(--text-color);
}

.modal-body {
  padding: 20px;
}

/* ==================== ANALYTICS ==================== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

/* ==================== SETTINGS ==================== */
.settings-form {
  max-width: 500px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: 0;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .sidebar.active {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .toggle-sidebar {
    display: block !important;
  }

  .main-content {
    width: 100%;
    height: auto;
  }

  .top-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    padding: 15px;
  }

  .header-left {
    width: 100%;
  }

  .header-left h2 {
    font-size: 18px;
  }

  .header-right {
    width: 100%;
    flex-direction: column;
    gap: 15px;
  }

  .search-bar {
    width: 100%;
  }

  .search-bar input {
    width: 100%;
  }

  .admin-profile {
    width: 100%;
  }

  .admin-info {
    align-items: flex-start;
  }

  .content-wrapper {
    padding: 15px;
    overflow-y: auto;
    height: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat-card {
    flex-direction: row;
  }

  .stat-card .stat-icon {
    margin-left: auto;
  }

  .table-responsive {
    font-size: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 100%;
  }

  table th,
  table td {
    padding: 10px;
    font-size: 12px;
  }

  table th {
    font-size: 11px;
  }

  .analytics-grid,
  .reports-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .btn-sm {
    padding: 8px 10px;
    font-size: 11px;
    min-height: 32px;
  }

  .btn-primary,
  .btn-danger {
    min-height: 36px;
    padding: 8px 12px;
  }

  .card {
    margin-bottom: 15px;
    border-radius: 8px;
  }

  .card-header {
    padding: 15px;
  }

  .card-body {
    padding: 15px;
  }

  .modal-content {
    width: 90% !important;
    max-height: 90vh !important;
    border-radius: 8px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-control {
    padding: 12px 15px;
    font-size: 16px;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .top-header {
    padding: 12px;
  }

  .header-left h2 {
    font-size: 16px;
  }

  .search-bar input {
    width: 100%;
    font-size: 14px;
  }

  .admin-profile {
    gap: 10px;
  }

  .admin-avatar {
    width: 30px;
    height: 30px;
  }

  .admin-info span {
    font-size: 12px;
  }

  .admin-info small {
    font-size: 10px;
  }

  .content-wrapper {
    padding: 10px;
  }

  .card {
    margin-bottom: 12px;
    border-radius: 6px;
  }

  .card-header {
    padding: 12px;
    flex-direction: column;
    gap: 10px;
  }

  .card-header h3 {
    font-size: 16px;
  }

  .card-body {
    padding: 12px;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .stat-content h3 {
    font-size: 14px;
  }

  .stat-value {
    font-size: 24px !important;
  }

  .stat-icon {
    margin-left: 0;
    margin-top: 15px;
    font-size: 28px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .table-responsive {
    font-size: 11px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: -12px;
    padding: 12px;
  }

  table {
    min-width: 100%;
    font-size: 10px;
  }

  table th {
    font-size: 10px;
    padding: 8px;
  }

  table td {
    padding: 8px;
    font-size: 10px;
  }

  table button {
    padding: 4px 8px !important;
    font-size: 9px !important;
    min-width: 50px;
  }

  .btn-primary,
  .btn-danger,
  .btn-success {
    padding: 10px 15px;
    font-size: 12px;
    min-height: 38px;
    min-width: 38px;
    touch-action: manipulation;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 10px;
    min-height: 30px;
  }

  .metric {
    flex-direction: column;
    gap: 8px;
  }

  .modal-content {
    width: 95% !important;
    max-height: 95vh !important;
    max-width: calc(100vw - 20px) !important;
    border-radius: 6px;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-body {
    padding: 15px;
    max-height: calc(95vh - 130px);
    overflow-y: auto;
  }

  .modal-footer {
    padding: 15px;
    flex-direction: column;
  }

  .modal-footer button {
    width: 100%;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .form-control {
    padding: 12px 15px;
    font-size: 16px;
    border-radius: 6px;
  }

  .analytics-grid,
  .reports-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  canvas {
    max-height: 300px !important;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Improve touch targets */
  button,
  a {
    -webkit-tap-highlight-color: transparent;
  }

  .menu-item {
    padding: 12px 15px;
    font-size: 14px;
  }

  .menu-item i {
    font-size: 16px;
  }

  .sidebar-header h1 {
    font-size: 16px;
  }
}
