/* Belbaza role dashboards overlay */
html.bb-dash-active #root {
  visibility: hidden;
  pointer-events: none;
}

#bb-dash-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: #0A1628;
  color: #F8FAFC;
  font-family: Inter, system-ui, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 72px;
}

#bb-dash-overlay * { box-sizing: border-box; }

.bb-dash-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 24px;
  gap: 20px;
}

.bb-dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.bb-dash-sidebar h2 {
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px 12px;
  margin: 0;
}

.bb-dash-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #94A3B8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.bb-dash-nav-btn:hover { background: rgba(255,255,255,0.05); color: #F8FAFC; }
.bb-dash-nav-btn.active { background: rgba(0,212,170,0.12); color: #00D4AA; }

.bb-dash-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.bb-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.bb-dash-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.bb-dash-header p {
  margin: 4px 0 0;
  color: #94A3B8;
  font-size: 14px;
}

.bb-dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,212,170,0.1);
  color: #00D4AA;
  font-size: 12px;
  font-weight: 600;
}

.bb-dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.bb-dash-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
}

.bb-dash-stat .label { font-size: 12px; color: #64748B; margin-bottom: 4px; }
.bb-dash-stat .value { font-size: 22px; font-weight: 700; color: #F8FAFC; }

.bb-dash-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.bb-dash-card h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.bb-dash-empty {
  text-align: center;
  padding: 48px 24px;
  color: #64748B;
}

.bb-dash-empty a { color: #00D4AA; }

.bb-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.bb-dash-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}

.bb-dash-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: rgba(255,255,255,0.05);
}

.bb-dash-item-body { padding: 14px; }
.bb-dash-item-body h4 { margin: 0 0 6px; font-size: 15px; }
.bb-dash-item-body p { margin: 0; font-size: 13px; color: #94A3B8; }
.bb-dash-item-price { color: #00D4AA; font-weight: 600; margin-top: 8px !important; }

.bb-dash-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.bb-dash-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.bb-dash-btn:hover { opacity: 0.85; }
.bb-dash-btn-primary { background: #00D4AA; color: #0A1628; }
.bb-dash-btn-secondary { background: rgba(255,255,255,0.08); color: #F8FAFC; }
.bb-dash-btn-danger { background: rgba(239,68,68,0.15); color: #EF4444; }
.bb-dash-btn-sm { padding: 5px 10px; font-size: 12px; }

.bb-dash-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.bb-dash-field label { display: block; font-size: 13px; color: #94A3B8; margin-bottom: 6px; }
.bb-dash-field input,
.bb-dash-field select,
.bb-dash-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #F8FAFC;
  font-size: 14px;
  font-family: inherit;
}

.bb-dash-field textarea { min-height: 90px; resize: vertical; }

.bb-dash-table-wrap { overflow-x: auto; }
.bb-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bb-dash-table th,
.bb-dash-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.bb-dash-table th { color: #64748B; font-weight: 600; font-size: 12px; }
.bb-dash-table tr:hover td { background: rgba(255,255,255,0.02); }

.bb-dash-compare-table { overflow-x: auto; }
.bb-dash-compare-table table { min-width: 600px; }

.bb-dash-sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.bb-dash-logout {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: rgba(239,68,68,0.1);
  color: #EF4444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.bb-dash-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  padding: 12px 20px;
  border-radius: 10px;
  background: #00D4AA;
  color: #0A1628;
  font-weight: 600;
  font-size: 14px;
  animation: bb-toast-in 0.25s ease;
}

@keyframes bb-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .bb-dash-shell { flex-direction: column; padding-bottom: 16px; }
  .bb-dash-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
  }
  .bb-dash-sidebar h2 { width: 100%; }
  .bb-dash-nav-btn { width: auto; flex: 1 1 auto; min-width: 120px; }
  .bb-dash-sidebar-footer { width: 100%; margin-top: 0; border-top: none; }
}
