/* ============================================
   ALO.BG - Dashboard Skeleton
   Shell/layout styles shared by all dashboard
   pages (sidebar, grid, content wrapper).
   Page-specific styles remain in account.css.
   ============================================ */

.dash {
  padding: var(--space-6) 0;
}

/* Mobile — drop dashboard chrome, нека всяка страница си контролира своето
   вертикално разстояние. На малък екран 24px+24px wrapper padding изяжда
   важно screen real estate (chat thread sticky header би оставал прекъснат
   от viewport top-а с 24px gap, например). */
@media (max-width: 767px) {
  .dash {
    padding: 0;
  }
}

.dash__grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .dash__grid {
    grid-template-columns: 270px 1fr;
  }
}

/* --- Sidebar --- */
.dash__sidebar {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  height: fit-content;
  align-self: start;
}

@media (max-width: 1023px) {
  .dash__sidebar { display: none; }
}

.dash__user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-3);
  border-bottom: 1.5px solid var(--color-border);
}

.dash__user-avatar {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  color: var(--color-text-inverse);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.dash__user-avatar-image{
object-fit: cover;
  border-radius: 50%;
  width: 100%;
  height: 100%;
}

.dash__user-info {
  min-width: 0;
}

.dash__user-name {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  color: var(--color-text);
}

.dash__user-email {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash__user-since {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Sidebar nav groups */
.dash__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash__nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  position: relative;
  border-bottom: 1px solid var(--color-border-light);
}

.dash__nav-link:last-child {
  border-bottom: none;
}

.dash__nav-link:hover {
  background-color: var(--color-bg);
  color: var(--color-text);
}

.dash__nav-link.is-active {
  background-color: rgba(25, 118, 210, 0.08);
  color: var(--color-secondary);
  font-weight: var(--font-weight-semibold);
}

.dash__nav-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--color-secondary);
  border-radius: 0 3px 3px 0;
}

.dash__nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-text);
}

.dash__nav-link.is-active svg {
  color: var(--color-secondary);
}

.dash__nav-link:hover svg {
  color: var(--color-text);
}

.dash__nav-link--accent {
  color: var(--color-primary);
}

.dash__nav-link--accent svg {
  color: var(--color-primary);
}

.dash__nav-link--accent:hover {
  background-color: rgba(229, 57, 53, 0.08);
  color: var(--color-primary-dark);
}

/* Sidebar badges */
.dash__badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.6875rem;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-full);
  background: var(--color-danger);
  color: #fff;
  margin-left: auto;
  line-height: 1;
}

.dash__nav-link.badge .dash__badge{
  display:inline-flex;
}

.dash__badge:empty {
  display: none;
}

.dash__wallet-balance {
  margin-left: auto;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-secondary);
  background: rgba(25, 118, 210, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* --- Main Content wrapper --- */
.dash__content {
  min-width: 0;
}

.dash__header {
  margin-bottom: var(--space-5);
}

.dash__header--flex {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
