/* PHASE-7 (2026-07-17): MOBILE NAVIGATION DRAWER + TRIGGER
   Augmentator 70-mobile-nav.js — slide-in drawer din stanga cu Dashboard metrics in cap.
   Doar pe viewport <=768px. Hidden pe desktop (default). Tokens din 00-tokens.css.
*/

/* ===== Trigger (hamburger bottom-left pe mobil) ===== */
.mobile-nav-trigger {
  display: none;
  position: fixed;
  bottom: var(--sp-4);
  left: var(--sp-4);
  width: 52px;
  height: 52px;
  border-radius: var(--r-pill);
  background: rgba(255, 90, 31, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 122, 63, 0.4);
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 14px rgba(255, 90, 31, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  z-index: var(--z-modal);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.mobile-nav-trigger:hover { transform: translateY(-2px) scale(1.05); }
.mobile-nav-trigger:active { transform: scale(0.95); }
.mobile-nav-trigger-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--err, #ef4444);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Drawer wrapper ===== */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  pointer-events: none;
}
.mobile-nav-drawer.open {
  pointer-events: auto;
}

/* Backdrop */
.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
}
.mobile-nav-drawer.open .mobile-nav-backdrop {
  opacity: 1;
}

/* Panel — slide-in din stanga, full-screen pe mobil */
.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100vw;
  max-width: 360px;
  background: linear-gradient(180deg, #0e0e10 0%, #161618 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--t-slow) var(--ease);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.mobile-nav-drawer.open .mobile-nav-panel {
  transform: translateX(0);
}

/* Body scrollabil */
.mobile-nav-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-5) 0 var(--sp-6);
  -webkit-overflow-scrolling: touch;
}

/* Dashboard section (PRIMA in drawer) */
.mobile-nav-section {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: calc(100% - var(--sp-6));
  margin: 0 var(--sp-3) var(--sp-2);
  padding: var(--sp-4);
  background: linear-gradient(135deg,
    rgba(255, 122, 0, 0.12) 0%,
    rgba(255, 90, 31, 0.06) 100%);
  border: 1px solid rgba(255, 122, 0, 0.25);
  border-radius: var(--r-lg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.mobile-nav-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 50%, rgba(255, 122, 0, 0.10), transparent 60%);
  pointer-events: none;
}
.mobile-nav-section:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 90, 31, 0.20);
}
.mobile-nav-section[data-active="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 14px rgba(255, 90, 31, 0.25);
}
.mobile-nav-section-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: rgba(255, 122, 0, 0.18);
  border: 1px solid rgba(255, 122, 0, 0.3);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  --accent: var(--c-dashboard, #ff7a00);
}
.mobile-nav-section-content {
  flex: 1;
  min-width: 0;
}
.mobile-nav-section-title {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.mobile-nav-section-sub {
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  line-height: 1.3;
}
.mobile-nav-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Divider intre Dashboard si tab-uri */
.mobile-nav-section-divider {
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-subtle);
  padding: var(--sp-3) var(--sp-5) var(--sp-2);
  margin-top: var(--sp-2);
}

/* Group labels */
.mobile-nav-group-label {
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-subtle);
  padding: var(--sp-4) var(--sp-5) var(--sp-2);
}

/* Tab items */
.mobile-nav-tab {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: calc(100% - var(--sp-6));
  margin: 0 var(--sp-3) 2px;
  padding: var(--sp-3) var(--sp-4);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all var(--t-fast) var(--ease);
  position: relative;
  --accent: var(--text-muted);
}
.mobile-nav-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.mobile-nav-tab[data-active="true"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
}
.mobile-nav-tab[data-active="true"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.mobile-nav-tab-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.mobile-nav-tab-label {
  flex: 1;
  font-size: var(--fs-body);
  font-weight: 500;
}

/* ===== Active viewport gate: doar pe mobil ===== */
@media (max-width: 768px) {
  .mobile-nav-trigger { display: inline-flex; }
  .mobile-nav-drawer { display: block; }
}

@media (min-width: 769px) {
  .mobile-nav-trigger { display: none !important; }
  .mobile-nav-drawer { display: none !important; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-panel,
  .mobile-nav-backdrop,
  .mobile-nav-trigger,
  .mobile-nav-section,
  .mobile-nav-tab {
    transition: none !important;
  }
}