.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(9,12,19,0.96) 0%, rgba(9,12,19,0.88) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,229,196,0.06);
}

.topbar__row {
  height: 100%;
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: 0 var(--grid-gutter);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

@media (max-width: 1024px) {
  .topbar__row { gap: var(--s-3); }
}

.topbar__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity var(--d-fast) var(--ease-std);
}
.topbar__logo:hover { opacity: 0.82; }

.topbar__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

@media (max-width: 480px) {
  .topbar__logo-img { height: 28px; }
}

.topbar__mainnav { flex: 1; }

.topbar__search {
  flex: 0 1 300px;
  position: relative;
}

.topbar__search input {
  width: 100%;
  padding: 8px 14px 8px 38px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-1);
  font-size: var(--t-sm);
  transition: border-color var(--d-fast) var(--ease-std), box-shadow var(--d-fast) var(--ease-std);
}
.topbar__search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
.topbar__search input::placeholder { color: var(--ink-3); }

.topbar__search-icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-size: 13px;
  pointer-events: none;
}

.topbar__tools { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }

.topbar__balance {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-sm);
  font-weight: 600;
}
.topbar__balance__label { color: var(--ink-3); font-size: var(--t-xs); }
.topbar__balance__value { color: var(--accent); }

.topbar__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--ink-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-sm);
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid var(--bg-1);
  transition: transform var(--d-fast) var(--ease-std);
}
.topbar__avatar:hover { transform: scale(1.08); }

.topbar__slip-wrap { position: relative; }

.topbar__slip-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: var(--ink-on-accent);
  border-radius: var(--r-pill);
  font-size: var(--t-2xs);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-0);
}

.topbar__burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  position: relative;
}
.topbar__burger:hover { background: var(--bg-2); }
.topbar__burger span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--ink-1);
  border-radius: 1px;
  transition: transform var(--d-fast) var(--ease-std), opacity var(--d-fast) var(--ease-std);
}
.topbar__burger span:nth-child(1) { top: 14px; }
.topbar__burger span:nth-child(2) { top: 19px; }
.topbar__burger span:nth-child(3) { top: 24px; }

@media (max-width: 1024px) {
  .topbar__mainnav { display: none; }
  .topbar__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .topbar__search { display: none; }
  .topbar__balance__label { display: none; }
  .topbar__tools { gap: var(--s-1); }
  .topbar__balance { padding: 6px 10px; font-size: var(--t-xs); }
}

@media (max-width: 480px) {
  .topbar__balance { display: none; }
  .topbar__logo-img { height: 26px; }
}

/* compliance strip */
.notice-bar {
  background: var(--bg-inset);
  border-top: 1px solid rgba(0,229,196,0.06);
  border-bottom: 1px solid var(--line-soft);
  padding: 6px var(--grid-gutter);
  text-align: center;
  font-size: var(--t-xs);
  color: var(--ink-3);
  letter-spacing: var(--tr-wide);
}

@media (max-width: 480px) {
  .notice-bar {
    font-size: var(--t-2xs);
    line-height: 1.4;
    padding: 5px var(--grid-gutter);
  }
}

.notice-bar__warn { color: var(--ink-2); font-weight: 600; }
.notice-bar a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.notice-bar a:hover { color: var(--accent); }
