/* ═══════════════════════════════════════════════════
   Report Template — Shared Navigation & Layout
   ═══════════════════════════════════════════════════ */

/* ── Mobile Sticky Header ── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  z-index: 200;
}

.mobile-header-index {
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.mobile-header-logo {
  height: 18px;
  width: auto;
}

.mobile-header-back {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
}
.mobile-header-back:hover { color: #1e293b; }

.mobile-header-back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.mobile-header-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-header-hamburger {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  color: #1e293b;
  -webkit-tap-highlight-color: transparent;
}
.mobile-header-hamburger:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* ── Slide-Over Menu ── */
.menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.menu-backdrop.open {
  opacity: 1;
}

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #fff;
  z-index: 310;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
}
.menu-panel.open {
  transform: translateX(0);
}

.menu-panel-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.menu-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #94a3b8;
  transition: background 0.15s, color 0.15s;
}
.menu-panel-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.menu-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  padding-right: 36px;
}

.menu-panel-date {
  font-size: 12px;
  color: #64748b;
}

.menu-panel-section {
  padding: 16px 20px;
}
.menu-panel-section + .menu-panel-section {
  border-top: 1px solid #f1f5f9;
}

.menu-panel-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.menu-panel-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-panel-nav li { margin-bottom: 2px; }

.menu-panel-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.menu-panel-nav a:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.menu-panel-nav a.active {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-weight: 600;
}

.menu-panel-nav .nav-num {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  width: 20px;
  flex-shrink: 0;
}
.menu-panel-nav a.active .nav-num {
  color: #2563eb;
}

/* ── Bottom Nav Bar (Module pages) ── */
.bottom-nav-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.bottom-nav-bar a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.bottom-nav-bar a:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.bottom-nav-bar .bottom-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-bar .bottom-nav-center a {
  color: #64748b;
}

.bottom-nav-bar svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Breadcrumbs ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 16px;
}
.breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb a:hover {
  color: #2563eb;
}
.breadcrumb-sep {
  color: #cbd5e1;
}

/* ── Responsive: show mobile elements, adjust layout ── */
@media (max-width: 900px) {
  .mobile-header {
    display: flex;
  }
  .menu-backdrop {
    display: block;
    pointer-events: none;
  }
  .menu-backdrop.open {
    pointer-events: auto;
  }
  .bottom-nav-bar {
    display: flex;
  }

  /* Padding handled per-page in inline styles to avoid specificity issues */

  /* Breadcrumb hidden on mobile — replaced by header back link */
  .breadcrumb {
    display: none;
  }
}

/* ── Small mobile tweaks ── */
@media (max-width: 480px) {
  .menu-panel {
    width: 100%;
    max-width: 100vw;
  }

  .bottom-nav-bar a {
    padding: 8px 10px;
    font-size: 12px;
  }
}
