.global-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 14px;
  background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-navy-2) 100%);
  color: white;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 50px rgba(15, 23, 42, 0.18);
  overflow-y: auto;
}

.global-sidebar a {
  text-decoration: none;
}

.global-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.global-nav-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.global-nav-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-teal);
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(47, 126, 121, 0.35);
}

.global-nav-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.global-nav-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.global-nav-title strong {
  display: block;
  max-width: 178px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: white;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.global-nav-title small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
}

.presence-indicator {
  display: inline-flex;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(6, 118, 71, 0.18);
}

.global-nav-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.global-nav-toggle span {
  width: 14px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: white;
}

.global-nav-mode-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.dark-mode-toggle,
.comfort-mode-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.global-nav-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.global-nav-section {
  margin: 14px 8px 5px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.global-nav-link {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.76);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.global-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transform: translateX(2px);
  text-decoration: none;
}

.global-nav-link.active {
  background: white;
  color: var(--color-navy);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.global-nav-link.locked {
  opacity: 0.48;
}

.global-nav-code {
  width: 32px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.global-nav-link.active .global-nav-code {
  background: #E8F3F1;
  color: var(--color-teal);
}

.global-nav-copy {
  min-width: 0;
}

.global-nav-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.global-nav-badge,
.nav-badge,
.global-nav-link .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--warning);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
}

.global-nav-profile,
.global-user-card,
.global-nav-user,
.global-nav-notifications,
.global-notifications,
.nav-notifications {
  padding: 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.global-nav-profile {
  margin-top: auto;
}

.global-nav-profile a,
.global-user-card a,
.global-nav-user a,
.global-notifications a,
.nav-notifications a {
  color: white;
}

.global-nav-notifications h3,
.global-notifications h3,
.nav-notifications h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .global-sidebar {
    position: relative;
    width: auto;
    inset: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }

  .global-nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .global-nav-section {
    grid-column: 1 / -1;
  }
}

/* CERTUS SPRINT 4 BATCH 4 — Mobile navigation hardening */
.global-sidebar,
.app-sidebar{
  min-width:0;
}

.global-nav-brand,
.global-nav-user,
.global-nav-title,
.global-nav-copy,
.global-nav-list,
.global-nav-section{
  min-width:0;
}

.global-nav-title strong,
.global-nav-title small,
.global-nav-copy,
.global-nav-user,
.global-nav-user small{
  overflow-wrap:anywhere;
}

@media(max-width:980px){
  .global-sidebar,
  .app-sidebar{
    position:relative;
    inset:auto;
    width:100%;
    max-width:100%;
    height:auto;
    min-height:0;
    overflow:visible;
    border-radius:0;
    box-shadow:none;
    z-index:auto;
  }

  .global-nav-shell,
  .global-nav-list{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  .global-nav-list{
    display:flex;
    flex-wrap:nowrap;
    gap:8px;
    padding-bottom:8px;
  }

  .global-nav-list a,
  .global-nav-list button,
  .global-nav-item{
    flex:0 0 auto;
    white-space:nowrap;
  }

  .global-nav-section{
    margin-top:12px;
  }

  .global-nav-mode-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
  }
}

@media(max-width:640px){
  .global-sidebar,
  .app-sidebar{
    padding:12px;
  }

  .global-nav-brand,
  .global-nav-user{
    align-items:flex-start;
  }

  .global-nav-list{
    gap:6px;
  }

  .global-nav-list a,
  .global-nav-list button,
  .global-nav-item{
    min-height:38px;
    padding:8px 10px;
    font-size:.86rem;
  }
}
