* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "DM Sans", sans-serif;
  background: #f8faf9;
  color: #172b22;
}

h1,
h2,
h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
}

a {
  text-decoration: none;
}

/* ===== LAYOUT ===== */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.dash-sidebar {
  width: 260px;
  background: #14532d;
  color: #fff;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 34px;
  padding: 0 8px;
}

.dash-brand img {
  width: 38px;
  height: 38px;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.dash-nav a {
  color: #d1fae5;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  transition: 0.2s ease;
}

.dash-nav a:hover,
.dash-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.dash-logout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.dash-logout:hover {
  background: #a3e635;
  border-color: #a3e635;
  color: #14532d;
}

/* ===== MAIN ===== */
.dash-main {
  flex: 1;
  min-width: 0;
  padding: 30px 36px 50px;
}

.dash-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.dash-welcome {
  flex: 1;
}

.dash-welcome p {
  color: #64746b;
  font-size: 14px;
  margin-bottom: 4px;
}

.dash-welcome h1 {
  font-size: 26px;
  color: #172b22;
}

.dash-welcome h1 span {
  color: #166534;
}

.dash-menu-btn {
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
}

.dash-btn {
  display: inline-block;
  background: #166534;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: 0.2s ease;
}

.dash-btn:hover {
  background: #14532d;
}

/* ===== ALERT ===== */
.dash-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 26px;
}

.dash-alert strong {
  display: block;
  margin-bottom: 4px;
  color: #92400e;
}

.dash-alert p {
  color: #78350f;
  font-size: 14px;
}

/* ===== STATS ===== */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.dash-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-stat-label {
  color: #64746b;
  font-size: 13px;
  font-weight: 500;
}

.dash-stat strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 32px;
  color: #166534;
}

.dash-stat .dash-stat-text {
  font-size: 17px;
  line-height: 1.3;
  color: #172b22;
}

/* ===== PRODUCTS PANEL ===== */
.dash-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 28px;
}

.dash-panel-header {
  margin-bottom: 22px;
}

.dash-panel-header h2 {
  font-size: 21px;
  margin-bottom: 4px;
}

.dash-panel-header p,
.dash-muted {
  color: #64746b;
  font-size: 14px;
}

.dash-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.dash-product {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: 0.2s ease;
}

.dash-product:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.07);
}

.dash-product img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f0fdf4;
  display: block;
}

.dash-product img.is-placeholder {
  object-fit: contain;
  padding: 40px;
}

.dash-product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-product-category {
  color: #64746b;
  font-size: 12px;
}

.dash-product-body h3 {
  font-size: 16px;
  line-height: 1.3;
}

.dash-product-price {
  color: #166534;
  font-size: 18px;
}

.dash-badge {
  width: fit-content;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
}

.dash-badge.live {
  background: #dcfce7;
  color: #166534;
}

.dash-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.dash-badge.removed {
  background: #fee2e2;
  color: #991b1b;
}

.dash-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  background: #f8faf9;
  border-radius: 14px;
}

.dash-empty h3 {
  margin-bottom: 8px;
}

.dash-empty p {
  color: #64746b;
  margin-bottom: 20px;
}

/* ===== MOBILE OVERLAY ===== */
.dash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
}

.dash-overlay.show {
  display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .dash-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .dash-sidebar.open {
    transform: translateX(0);
  }

  .dash-menu-btn {
    display: block;
  }

  .dash-main {
    padding: 22px 18px 40px;
  }
}

@media (max-width: 600px) {
  .dash-topbar {
    flex-wrap: wrap;
  }

  .dash-topbar .dash-btn {
    width: 100%;
    text-align: center;
    order: 3;
  }

  .dash-welcome h1 {
    font-size: 21px;
  }

  .dash-alert {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-panel {
    padding: 20px;
  }

  .dash-stat strong {
    font-size: 26px;
  }
}
/* PRODUCT DELETE BUTTON */

.delete-product-btn {
  margin-top: 10px;
  padding: 11px 14px;

  background: #fee2e2;
  color: #b91c1c;

  border: none;
  border-radius: 9px;

  font-family: inherit;
  font-weight: 600;
  font-size: 13px;

  cursor: pointer;
  transition: 0.2s ease;
}

.delete-product-btn:hover {
  background: #fecaca;
}

.delete-product-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* EDIT PRODUCT BUTTON */

.edit-product-btn {
  display: block;
  margin-top: 10px;
  padding: 11px 14px;

  background: #dcfce7;
  color: #166534;

  border-radius: 9px;
  text-align: center;

  font-family: inherit;
  font-weight: 600;
  font-size: 13px;

  transition: 0.2s ease;
}

.edit-product-btn:hover {
  background: #bbf7d0;
}
/* ADMIN DASHBOARD LINK */

.dash-nav a#adminDashboardLink {
    background: rgba(163, 230, 53, 0.12);
    color: #d9f99d;
    border: 1px solid rgba(163, 230, 53, 0.25);
    margin-top: 15px;
}

.dash-nav a#adminDashboardLink:hover {
    background: #a3e635;
    color: #14532d;
}
[hidden] {
    display: none !important;
}
/* ======================================
   PROMOTE PRODUCT BUTTON
====================================== */

.promote-product-btn {
    display: block;
    margin-top: 8px;
    padding: 11px 14px;

    background: #fef9c3;
    color: #854d0e;

    border: 1px solid #fde68a;
    border-radius: 9px;

    font-family: inherit;
    font-weight: 700;
    font-size: 13px;

    text-align: center;
    text-decoration: none;

    transition: 0.2s ease;
}

.promote-product-btn:hover {
    background: #fef08a;
}