/* Responsive Layout & Mobile Navigation (Bottom Nav) */

/* Desktop Sidebar */
.desktop-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 40;
}

.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981, #047857);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: white;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
}

.sidebar-nav {
  padding: 1.25rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.nav-item.active {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 45;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  flex: 1;
  height: 100%;
  cursor: pointer;
  transition: color 0.15s;
}

.bottom-nav-item i {
  font-size: 1.15rem;
}

.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .desktop-sidebar {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .main-wrapper {
    padding-bottom: 74px; /* Space for bottom nav */
  }

  .content-area {
    padding: 1rem;
  }

  .top-header {
    padding: 0 1rem;
    height: 60px;
  }

  .role-badge-selector span.role-title {
    display: none;
  }

  /* Table formatting on mobile: horizontally scrollable with clear indication */
  .table-responsive {
    box-shadow: inset -6px 0 6px -6px rgba(0,0,0,0.2);
  }
}

@media (max-width: 480px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
}
