/* ===============================
   DASHBOARD BASE
=================================*/
.dashboard {
  max-width: 1400px;
  margin: auto;
  padding: 20px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ===============================
   QUICK ACTION BAR
=================================*/
.quick-actions-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 15px;
  margin-bottom: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.action-group.horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===============================
   GRID LAYOUT
=================================*/
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.dashboard .stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.store-grid {
  display: grid;
  gap: 20px;
}

/* ===============================
   CARDS
=================================*/
.card,
.dashboard .store-card,
.card-table {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: 0.25s;
}

.card:hover,
.dashboard .store-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

/* ===============================
   STORE CARD
=================================*/
.dashboard .store-card {
  border-radius: 16px;
}

.dashboard .store-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.dashboard .store-card .address,
.dashboard .store-card .contact {
  font-size: 14px;
  color: #64748b;
}

.dashboard .active-store {
  border: 2px solid #2563eb;
  background: #f0f7ff;
}

.store-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  background: #eef2ff;
  color: #4338ca;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.store-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

/* ===============================
   PRODUCTS
=================================*/
.section-title {
  font-size: 22px;
  font-weight: 600;
  margin: 30px 0 15px;
}

.products-scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 5px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.price {
  font-weight: bold;
  color: #16a34a;
}

.product-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

/* ===============================
   BUTTON SYSTEM
=================================*/
.btn {
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  transition: 0.2s;
}

.btn:hover {
  transform: scale(1.05);
}

.btn.primary {
  background: #2563eb;
  color: #fff;
}

.btn.secondary {
  background: #f1f5f9;
  color: #0f172a;
}

.btn.dark {
  background: #0f172a;
  color: #fff;
}

.btn.danger {
  background: #dc2626;
  color: #fff;
}

.btn.warning {
  background: #f59e0b;
  color: #fff;
}

.btn.small {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.dashboard .store-card .btn {
  margin-top: 10px;
}

/* ===============================
   EMPTY STATE
=================================*/
.empty-state {
  text-align: center;
  padding: 20px;
  color: #777;
}

/* ===============================
   SCROLLBAR (modern)
=================================*/
.products-scroll::-webkit-scrollbar {
  width: 6px;
}

.products-scroll::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 10px;
}

/* ===============================
   STORE USERS PAGE
=================================*/
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-header h2 {
  margin: 0;
}

.btn-create-user {
  padding: 10px 18px;
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s ease;
}

.btn-create-user:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Table */
.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.users-table th {
  text-align: left;
  color: #64748b;
}

.users-table tr:hover {
  background: #f9fafb;
}

/* Badges */
.role-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.status-badge {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.active {
  background: #dcfce7;
  color: #166534;
}

.status-badge.inactive {
  background: #fee2e2;
  color: #991b1b;
}

/* ===============================
   MOBILE
=================================*/
@media (max-width: 768px) {
  .page-title {
    font-size: 22px;
  }

  .action-group.horizontal {
    flex-direction: column;
    align-items: stretch;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}