/* SAT Portal–aligned top bar: full black, compact height, light user pill */

.top-navbar {
  --navbar-h: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--navbar-h);
  height: var(--navbar-h);
  padding: 0 32px;
  box-sizing: border-box;
  background: #000000;
  color: #ffffff;
  flex-shrink: 0;
  border-bottom: none;
  min-width: auto;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top-navbar--sidebar-open {
  padding-left: var(--app-page-pad-x, 40px);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
}

.navbar-icon-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #2a2a2a;
  color: #fafafa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.navbar-icon-btn:hover {
  background: #333333;
  border-color: rgba(255, 255, 255, 0.16);
}

.navbar-icon-btn:focus-visible {
  outline: 2px solid rgba(255, 77, 79, 0.85);
  outline-offset: 2px;
}

.navbar-sidebar-toggle {
  flex-direction: column;
  gap: 3px;
}

.navbar-sidebar-toggle span {
  width: 15px;
  height: 2px;
  border-radius: 99px;
  background: #fafafa;
}

.navbar-theme-toggle {
  color: #fafafa;
}

.navbar-brand-logo {
  flex-shrink: 0;
  display: block;
  margin-left: 2px;
}

/* .navbar-brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
} */

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.navbar-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Light pill on black bar — matches SAT reference */
.navbar-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(300px, 56vw);
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  /* background: linear-gradient(180deg, #f4f4f5 0%, #e4e4e7 100%); */
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.navbar-user-pill:hover {
  background: linear-gradient(180deg, #f4f4f5 0%, #e4e4e7 100%);
}

.navbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ff3b30;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-user-email {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  color: #3f3f46;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

@media (max-width: 600px) {
  .top-navbar {
    --navbar-h: 48px;
    padding: 0 12px;
    gap: 8px;
  }

  .navbar-brand {
    font-size: 14px;
  }

  .navbar-user-pill {
    max-width: min(200px, 50vw);
    padding: 4px 10px 4px 5px;
    gap: 8px;
  }

  .navbar-user-email {
    font-size: 12px;
  }

  .navbar-left {
    gap: 6px;
  }

  .navbar-icon-btn {
    width: 34px;
    height: 34px;
  }

  .navbar-theme-toggle {
    display: none;
  }
}
