.dashboard-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto !important;
}

body {
  overflow-y: auto !important;
  height: auto !important;
}

/* Stats Cards */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  margin-bottom: 40px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 30px;
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-icon {
  font-size: 38px;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

body.dark .stat-icon {
  background: rgba(0, 0, 0, 0.3);
}

.stat-content h3 {
  font-family: 'Fredoka', cursive;
  font-size: 28px;
  color: #2f7a4f;
  margin-bottom: 4px;
}

body.dark .stat-content h3 {
  color: #D4AF37;
}

.stat-content p {
  font-size: 14px;
  font-weight: 500;
  color: var(--light-accent, #c0651a);
}

body.dark .stat-content p {
  color: #ccc;
}

/* Tabs System */
.dashboard-tabs-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.tabs-nav {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  padding: 6px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  width: fit-content;
}

body.dark .tabs-nav {
  background: rgba(45, 45, 45, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

.tab-btn {
  padding: 12px 28px;
  border-radius: 40px;
  border: none;
  background: transparent;
  font-family: 'Fredoka', cursive;
  font-size: 16px;
  color: var(--light-accent, #c0651a);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark .tab-btn {
  color: #eee;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

body.dark .tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
  background: #2f7a4f;
  color: white;
  box-shadow: 0 6px 20px rgba(47, 122, 79, 0.3);
}

body.dark .tab-btn.active {
  background: #D4AF37;
  color: #1a1a1a;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.tab-content {
  display: none;
  animation: tabFadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

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

/* Overview Tab */
.overview-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

.panel-insights, .panel-actions {
  padding: 30px;
  border-radius: 24px;
}

.panel-insights h3, .panel-actions h3 {
  font-family: 'Fredoka', cursive;
  font-size: 20px;
  color: #2f7a4f;
  margin-bottom: 20px;
}

body.dark .panel-insights h3, body.dark .panel-actions h3 {
  color: #D4AF37;
}

.insights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insights-list li {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark .insights-list li {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.insight-label {
  font-weight: 500;
  color: var(--light-accent, #c0651a);
}

body.dark .insight-label {
  color: #bbb;
}

.insight-value {
  font-weight: 600;
  color: #1e293b;
}

body.dark .insight-value {
  color: #eee;
}

.text-green {
  color: #27ae60 !important;
}

body.dark .text-green {
  color: #2ecc71 !important;
}

.quick-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.action-btn-primary, .action-btn-secondary {
  padding: 16px 24px;
  border-radius: 16px;
  border: none;
  font-family: 'Fredoka', cursive;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.action-btn-primary {
  background: #2f7a4f;
  color: white;
  box-shadow: 0 4px 15px rgba(47, 122, 79, 0.2);
}

.action-btn-primary:hover {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(47, 122, 79, 0.3);
}

.action-btn-secondary {
  background: rgba(255, 255, 255, 0.6);
  color: #2f7a4f;
  border: 1px solid rgba(47, 122, 79, 0.2);
}

body.dark .action-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #D4AF37;
  border-color: rgba(212, 175, 55, 0.2);
}

.action-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
}

body.dark .action-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Listings / Orders Table System */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 {
  font-family: 'Fredoka', cursive;
  font-size: 20px;
  color: #2f7a4f;
}

body.dark .section-header h3 {
  color: #D4AF37;
}

.btn-create {
  padding: 10px 20px;
  background: #2f7a4f;
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'Fredoka', cursive;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(47, 122, 79, 0.2);
}

.btn-create:hover {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(47, 122, 79, 0.3);
}

.listings-table-container, .orders-table-container {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
}

body.dark .listings-table-container, body.dark .orders-table-container {
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(20, 20, 20, 0.4);
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.dashboard-table th {
  padding: 18px 24px;
  font-family: 'Fredoka', cursive;
  font-size: 15px;
  color: #2f7a4f;
  background: rgba(47, 122, 79, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark .dashboard-table th {
  color: #D4AF37;
  background: rgba(212, 175, 55, 0.05);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dashboard-table td {
  padding: 16px 24px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--light-text-primary, #110b08);
}

body.dark .dashboard-table td {
  color: #eee;
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.food-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.food-cell-img {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Status Badges */
.badge {
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.badge.placed, .badge.approved {
  background: rgba(46, 204, 113, 0.15);
  color: #27ae60;
}

.badge.pending_payment, .badge.pending_verification {
  background: rgba(241, 196, 15, 0.15);
  color: #d4ac0d;
}

.badge.cancelled {
  background: rgba(231, 76, 60, 0.15);
  color: #c0392b;
}

.badge.delivered {
  background: rgba(52, 152, 219, 0.15);
  color: #2980b9;
}

/* Action Buttons inside Table */
.btn-table-delete {
  padding: 6px 14px;
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-table-delete:hover {
  background: #e74c3c;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.2);
}

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

/* Responsive adjustments */
@media (max-width: 600px) {
  .dashboard-page {
    padding: 60px 16px 20px;
  }
  .stat-card {
    padding: 16px 20px;
  }
}

/* ── Edit Modal ── */
.edit-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(47, 122, 79, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  animation: editFadeIn 0.3s ease;
}

.edit-modal-overlay.active {
  display: flex;
}

@keyframes editFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.edit-modal {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 32px;
  padding: 36px 32px;
  width: 520px;
  max-width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
  animation: editPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes editPopIn {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0);      opacity: 1; }
}

.edit-modal::-webkit-scrollbar { width: 6px; }
.edit-modal::-webkit-scrollbar-track { background: transparent; }
.edit-modal::-webkit-scrollbar-thumb { background: rgba(47, 122, 79, 0.3); border-radius: 10px; }

.edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.edit-modal-header h2 {
  font-family: 'Fredoka', cursive;
  font-size: 24px;
  color: #2f7a4f;
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.edit-modal-close:hover {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  transform: rotate(90deg);
}

.edit-field {
  margin-bottom: 18px;
}

.edit-field label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--light-text-primary, #110b08);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.edit-field input,
.edit-field select,
.edit-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.edit-field input:focus,
.edit-field select:focus,
.edit-field textarea:focus {
  outline: none;
  border-color: #2f7a4f;
  box-shadow: 0 0 0 3px rgba(47, 122, 79, 0.12);
  background: #fff;
}

.edit-field textarea {
  resize: vertical;
  min-height: 60px;
}

.edit-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.edit-img-preview {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: none;
}

.edit-img-preview.visible {
  display: block;
}

.edit-modal-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.edit-btn-save {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 50px;
  background: #2f7a4f;
  color: white;
  font-family: 'Fredoka', cursive;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(47, 122, 79, 0.25);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.edit-btn-save:hover {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(47, 122, 79, 0.35);
}

.edit-btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.edit-btn-cancel {
  flex: 0.6;
  padding: 14px;
  border: none;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--light-text-primary, #110b08);
  font-family: 'Fredoka', cursive;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-btn-cancel:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Table action buttons container */
.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-table-edit {
  padding: 6px 14px;
  background: rgba(47, 122, 79, 0.1);
  color: #2f7a4f;
  border: 1px solid rgba(47, 122, 79, 0.2);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-table-edit:hover {
  background: #2f7a4f;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(47, 122, 79, 0.2);
}

/* ── Dark mode for Edit Modal ── */
body.dark .edit-modal {
  background: rgba(25, 25, 25, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

body.dark .edit-modal-header h2 {
  color: #D4AF37;
}

body.dark .edit-modal-close {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
}

body.dark .edit-field label {
  color: #dcd0c4;
}

body.dark .edit-field input,
body.dark .edit-field select,
body.dark .edit-field textarea {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #eee;
}

body.dark .edit-field input:focus,
body.dark .edit-field select:focus,
body.dark .edit-field textarea:focus {
  border-color: #D4AF37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

body.dark .edit-btn-save {
  background: #D4AF37;
  color: #1a1a1a;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25);
}

body.dark .edit-btn-save:hover {
  background: #FFD700;
}

body.dark .edit-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
}

body.dark .btn-table-edit {
  background: rgba(212, 175, 55, 0.1);
  color: #D4AF37;
  border-color: rgba(212, 175, 55, 0.2);
}

body.dark .btn-table-edit:hover {
  background: #D4AF37;
  color: #1a1a1a;
}

/* Edit modal responsive */
@media (max-width: 600px) {
  .edit-modal {
    padding: 24px 18px;
    border-radius: 24px;
    max-height: 92vh;
  }

  .edit-modal-header h2 {
    font-size: 20px;
  }

  .edit-field-row {
    grid-template-columns: 1fr;
  }

  .edit-modal-actions {
    flex-direction: column;
  }

  .edit-btn-cancel {
    flex: 1;
  }
}

/* Scoped Scrollbar overrides for Seller Dashboard */
::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02) !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(47, 122, 79, 0.25) !important;
  border-radius: 10px !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(47, 122, 79, 0.45) !important;
}

/* Dark mode scrollbar overrides */
body.dark ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02) !important;
}

body.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12) !important;
}

body.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}
