/* ============================================================
   EPF ECOSYSTEM — SIDEBAR STYLES (shared across all pages)
   assets/css/sidebar.css
   ============================================================ */

.epf-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-white);
  border-right: 1px solid var(--bd);
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 750;
  scrollbar-width: thin;
  scrollbar-color: var(--bd) transparent;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  padding-top: calc(var(--nav-h) + 8px);
}

.epf-sidebar::-webkit-scrollbar {
  width: 4px;
}

.epf-sidebar::-webkit-scrollbar-thumb {
  background: var(--bd);
  border-radius: 2px;
}

.epf-sidebar.sb-open {
  transform: translateX(0);
  box-shadow: var(--sh-lg);
}

.sb-section {
  padding: 18px 0 8px;
  border-bottom: 1px solid var(--bd);
}

.sb-section:last-of-type {
  border-bottom: none;
}

.sb-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tx-light);
  padding: 0 18px 10px;
}

.sb-nav-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 8px;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--tx-body);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
  position: relative;
}

.sb-link-icon {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--tx-muted);
  flex-shrink: 0;
  transition: color 0.15s;
}

.sb-link-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-link-ext-icon {
  font-size: 9px;
  color: var(--tx-light);
}

.sb-link:hover {
  background: var(--teal-dim);
  color: var(--teal);
  padding-left: 16px;
}

.sb-link:hover .sb-link-icon {
  color: var(--teal);
}

.sb-link.active {
  background: var(--teal-dim);
  color: var(--teal);
  font-weight: 600;
}

.sb-link.active .sb-link-icon {
  color: var(--teal);
}

.sb-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--teal);
  border-radius: 0 2px 2px 0;
}

.sb-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--bd);
  border-top: 1px solid var(--bd);
}

.sb-metric {
  background: var(--bg-white);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sb-metric-number {
  font-family: var(--fd);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.sb-metric-label {
  font-size: 10px;
  color: var(--tx-muted);
  line-height: 1.3;
}

.sb-cta-box {
  padding: 14px;
  margin-top: auto;
  background: var(--bg-muted);
  border-top: 1px solid var(--bd);
}

.sb-cta-text {
  font-size: 12px;
  color: var(--tx-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  font-weight: 500;
}

.sb-cta-box .btn {
  width: 100%;
  justify-content: center;
  font-size: 12px;
  padding: 11px 16px;
}

.sb-close-btn {
  display: flex;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  background: var(--bg-muted);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--tx-body);
  cursor: pointer;
}

.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 699;
  backdrop-filter: blur(2px);
}

.sb-overlay.show {
  display: block;
}

.sb-fab {
  display: flex;
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(108, 190, 237, 0.4);
  z-index: 750;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.sb-fab:hover {
  background: var(--teal-dk);
  transform: scale(1.08);
}
