/* NAVIGATION.CSS — Header, Bottom Nav, FAB, Quick Actions */

/* ─── APP CONTAINER ─── */
.app-container {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  position: fixed;
  inset: 0;
}
.app-container.active { display: flex; }

/* ─── HEADER ─── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  z-index: var(--z-sticky);
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 768px;
  margin: 0 auto;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-avatar-wrap {
  position: relative;
  width: 50px; height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-logo-small {
  border-radius: 50%;
  width: 100%; height: 100%;
  object-fit: contain;
}
.avatar-icon-sm { color: #fff; font-size: 1rem; }
.header-greeting {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--fw-medium);
}
.header-title {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.01em;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--ease);
  border: 1.5px solid var(--border);
}
.header-icon-btn:hover {
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.3);
  transform: scale(1.05);
}
.header-icon-btn.logout-btn:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(239,35,60,0.3);
  transform: scale(1.05);
}
.header-badge-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

/* ─── MAIN CONTENT ─── */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: clip;
  padding: 64px 0 96px 0;
  scroll-behavior: smooth;
  background: var(--grad-bg);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
}
.main-content > .alert {
  margin: 16px 20px 0;
}

/* ─── TAB CONTENT ─── */
.tab-content {
  display: none;
  padding: 0;
  animation: fadeIn 250ms ease;
  overflow-x: clip;
  overflow-y: visible;
  max-width: 100%;
}
.tab-content.active { display: block; }

/* ─── BOTTOM NAVIGATION ─── */
.sidebar-brand { display: none; }
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 8px 0 12px;
  height: 76px;
  z-index: var(--z-nav);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
  overflow: visible;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 18px;
  color: var(--text-muted);
  border-radius: var(--r-md);
  transition: color var(--ease);
  min-width: 56px;
  position: relative;
}
.nav-icon-wrap {
  width: 50px; height: 56px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--ease);
}
.nav-label {
  font-size: 0.6875rem;
  font-weight: var(--fw-medium);
  line-height: 1;
  transition: color var(--ease);
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active .nav-icon-wrap {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.15);
}
.bottom-nav-item:not(.active):hover { color: var(--text-secondary); }

/* ─── FAB (Floating Action Button) ─── */
.fab-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 4px;
}
.fab-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: var(--shadow-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  position: relative;
  bottom: 8px;
}
.fab-btn:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 16px 48px rgba(61, 106, 142,0.45); }
.fab-btn:active { transform: scale(0.96); }
.fab-plus {
  color: #fff;
  font-size: 1.25rem;
  transition: transform var(--ease);
}
.fab-btn.active .fab-plus { transform: rotate(45deg); }

/* Quick Actions Menu */
.quick-actions-menu {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  transform-origin: bottom center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all var(--ease-med);
  z-index: var(--z-modal);
}
.quick-actions-menu.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) scale(1);
}
.quick-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--r-full);
  padding: 10px 20px 10px 10px;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  transition: all var(--ease);
  border: 1px solid var(--border);
}
.quick-action-item:hover { background: var(--bg-card-alt); transform: translateX(-4px); }
.qa-icon-wrap {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

/* ─── HEADER INTERACTIVE ELEMENTS ─── */
.header-avatar-wrap {
  cursor: zoom-in;
  transition: transform var(--ease), box-shadow var(--ease);
  border-radius: 50%;
}
.header-avatar-wrap:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.25);
}
.header-avatar-wrap:active { transform: scale(0.97); }

#headerUserName {
  cursor: pointer;
  transition: color var(--ease);
}
#headerUserName:hover { color: var(--primary); }
#headerUserName:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ─── IMAGE LIGHTBOX ─── */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  animation: fadeIn 200ms ease forwards;
}
.img-lightbox.closing {
  animation: imgLightboxOut 220ms ease forwards;
}
@keyframes imgLightboxOut {
  to { opacity: 0; backdrop-filter: blur(0px); }
}
.img-lightbox-img {
  max-width: min(300px, 80vw);
  max-height: 80vh;
  border-radius: 50%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(255,255,255,0.12);
  cursor: default;
  animation: imgLightboxIn 300ms var(--spring-snappy) forwards;
  object-fit: cover;
  aspect-ratio: 1;
}
@keyframes imgLightboxIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.img-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background var(--ease), transform var(--ease);
  cursor: pointer;
}
.img-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.08);
}
