/* ============================================================
   nav.css — Shared site navigation styles
   Included by all pages via <link rel="stylesheet" href="/css/nav.css">
   ============================================================ */

/* ?? Design tokens (scoped to nav; full tokens live in each page) ?? */
:root {
  --nav-bg:       rgba(6, 13, 24, .96);
  --nav-border:   #1a2e4a;
  --nav-text:     #7a9ab8;
  --nav-hover-bg: #111f35;
  --nav-active:   #38bdf8;
  --nav-pill-r:   8px;
}

/* ?? Shell ?????????????????????????????????????????????????? */
.site-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 1030;
  height: 52px;
  display: flex;
  align-items: center;
}

.site-nav .nav-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 52px;
}

/* ?? Brand ?????????????????????????????????????????????????? */
.site-nav .nav-brand {
  font-weight: 800;
  font-size: .95rem;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .45rem;
  letter-spacing: -.01em;
  flex-shrink: 0;
  margin-right: .75rem;
}
.site-nav .nav-brand .hi,
.site-nav .nav-brand i { color: #38bdf8; }
.site-nav .nav-brand i  { font-size: 1.1rem; }

/* ?? Link area ?????????????????????????????????????????????? */
.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: .2rem;
  flex: 1;
}

/* ?? Pills ?????????????????????????????????????????????????? */
.site-nav .nav-pill {
  color: var(--nav-text);
  font-size: .8rem;
  font-weight: 500;
  padding: .32rem .75rem;
  border-radius: var(--nav-pill-r);
  transition: color .13s, background .13s, border-color .13s;
  border: 1px solid transparent;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}
.site-nav .nav-pill:hover {
  color: #fff;
  background: var(--nav-hover-bg);
  border-color: var(--nav-border);
}
.site-nav .nav-pill.active {
  color: var(--nav-active);
  background: rgba(56, 189, 248, .08);
  border-color: rgba(56, 189, 248, .25);
}

/* Admin pill */
.site-nav .nav-pill.nav-admin     { color: #a78bfa; }
.site-nav .nav-pill.nav-admin:hover {
  color: #c4b5fd;
  background: rgba(167, 139, 250, .08);
  border-color: rgba(167, 139, 250, .25);
}

/* ?? Right slot ????????????????????????????????????????????? */
.site-nav .nav-right {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* ?? CTA buttons ???????????????????????????????????????????? */
.site-nav .nav-cta {
  background: #0ea5e9;
  color: #fff !important;
  font-weight: 700;
  border-radius: var(--nav-pill-r);
  padding: .32rem 1rem;
  font-size: .8rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: background .13s, transform .13s;
  white-space: nowrap;
}
.site-nav .nav-cta:hover {
  background: #0284c7;
  transform: translateY(-1px);
}
.site-nav .nav-cta.nav-logout {
  background: transparent;
  border: 1px solid #1f3a5c;
  color: #7a9ab8 !important;
}
.site-nav .nav-cta.nav-logout:hover {
  border-color: #f87171;
  color: #f87171 !important;
  background: rgba(248, 113, 113, .08);
  transform: none;
}

/* ?? Hamburger (mobile) ????????????????????????????????????? */
.site-nav .nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--nav-border);
  color: var(--nav-text);
border-radius: 7px;
  padding: .3rem .5rem;
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 768px) {
  .site-nav .nav-toggle { display: flex; }
  .site-nav .nav-links,
  .site-nav .nav-right  { display: none; }
  .site-nav.open .nav-links,
  .site-nav.open .nav-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: .25rem;
    padding: .5rem 0;
  }
  .site-nav.open {
    height: auto;
    flex-wrap: wrap;
    padding-bottom: .5rem;
  }
  .site-nav .nav-inner { flex-wrap: wrap; height: auto; padding-bottom: 0; }
}

/* ?? Notifications bell ????????????????????????????????????? */
.notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.notif-bell {
  background: none;
  border: none;
  color: #7a9ab8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: .25rem .4rem;
  border-radius: 7px;
  transition: color .15s, background .15s;
  position: relative;
  display: flex;
  align-items: center;
}
.notif-bell:hover { color: #fff; background: #111f35; }

.notif-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: #f87171;
  color: #fff;
  font-size: .5rem;
  font-weight: 900;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
  line-height: 1;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #0b1628;
  border: 1px solid #1f3a5c;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  z-index: 2000;
  overflow: hidden;
  display: none;
}
.notif-dropdown.open { display: block; }

.notif-hd {
  padding: .65rem 1rem;
  border-bottom: 1px solid #1a2e4a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-hd span { font-size: .78rem; font-weight: 700; color: #fff; }
.notif-hd button {
  background: none;
  border: none;
  color: #7a9ab8;
  font-size: .7rem;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}
.notif-hd button:hover { color: #38bdf8; }

.notif-list { max-height: 340px; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: .6rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid #1a2e4a;
  cursor: default;
  transition: background .1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread     { background: rgba(14, 165, 233, .04); }
.notif-item:hover      { background: #111f35; }

.notif-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
  margin-top: .35rem;
}
.notif-dot.read { background: transparent; border: 1px solid #1f3a5c; }

.notif-title { font-size: .78rem; font-weight: 700; color: #fff; margin-bottom: .1rem; }
.notif-msg   { font-size: .74rem; color: #7a9ab8; line-height: 1.45; }
.notif-time  { font-size: .65rem; color: #4a6882; margin-top: .2rem; }
.notif-empty { padding: 2rem 1rem; text-align: center; color: #7a9ab8; font-size: .82rem; }
