/* topnav.css — 前台頂部導覽列 */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #f5f7fb; }

#frontNav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fn-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: #111;
  font-size: 14px; font-weight: 900;
  flex-shrink: 0;
}
.fn-brand-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.fn-links {
  display: flex; align-items: center; gap: 2px;
  flex: 1; overflow: hidden;
}
.fn-link {
  padding: 6px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  text-decoration: none; color: #555;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.fn-link:hover { background: #f0f4ff; color: #3b82f6; }
.fn-link.fn-active { background: #eff6ff; color: #2563eb; font-weight: 800; }
.fn-user {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; flex-shrink: 0;
}
.fn-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 900;
}
.fn-email { font-size: 12px; color: #666; }
.fn-logout {
  padding: 5px 12px; border-radius: 8px;
  background: #f5f5f5; border: none;
  font-size: 12px; font-weight: 700; color: #555;
  cursor: pointer; transition: background .12s;
}
.fn-logout:hover { background: #ffe4e4; color: #b91c1c; }

/* 讓 .wrap 不再有很大的 margin-top */
body > .wrap, #frontWrap > .wrap {
  padding-top: 20px !important;
}
@media (max-width: 640px) {
  #frontNav { padding: 0 14px; }
  .fn-links { display: none; }
}
