/* BYNZO app chrome: sidebar / topbar / bottom nav */

#app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--bnz-black); color: #fff;
  display: flex; flex-direction: column; padding: 16px 12px 18px;
  z-index: var(--z-nav);
  overflow: auto;
}
.brand {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 18px;
  color: #fff;
}
.brand-lockup b { font-size: 15px; letter-spacing: 0.08em; color: #fff; }
.brand img { height: 28px; width: auto; }
.brand-lockup { display: flex; flex-direction: column; }
.brand-lockup b { font-size: 15px; letter-spacing: 0.08em; }
.brand-lockup span { font-size: 10px; color: #a1a1aa; letter-spacing: 0.12em; text-transform: uppercase; }

.side-search {
  margin: 0 8px 14px; display: flex; align-items: center; gap: 8px;
  background: var(--bnz-elev); border-radius: 12px; padding: 9px 10px; color: #a1a1aa; font-size: 13px;
  cursor: pointer; border: 1px solid transparent;
}
.side-search:hover { border-color: #2e2e33; }
.side-search kbd {
  margin-left: auto; font-size: 10px; border: 1px solid #3f3f46; border-radius: 6px; padding: 2px 5px; color: #d4d4d8;
}

.nav-group { padding: 6px 8px 10px; }
.nav-label {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #71717a;
  padding: 8px 10px 6px; font-weight: var(--fw-sb);
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 12px; color: #d4d4d8; font-size: 13.5px; font-weight: var(--fw-md);
}
.nav-link:hover { background: var(--bnz-elev); color: #fff; }
.nav-link.active { background: var(--bnz-orange); color: #fff; }
.nav-link .count {
  margin-left: auto; background: #2a2a2e; color: #fff; font-size: 10px;
  min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center;
}
.nav-link.active .count { background: rgba(255,255,255,.22); }

.side-footer {
  margin-top: auto; padding: 8px;
}
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px;
  background: var(--bnz-elev); width: 100%; text-align: left; color: #fff;
}
.user-chip:hover { background: var(--bnz-elev-2); }
.user-chip small { color: #a1a1aa; display: block; font-size: 11px; }

.main-wrap { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: var(--z-top);
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 22px; background: rgba(244,244,246,.86); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bnz-border);
}
.top-search {
  flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--bnz-border); border-radius: 14px; padding: 0 12px; height: 42px;
  color: var(--bnz-muted); cursor: text;
}
.top-search input {
  border: 0; outline: none; width: 100%; background: transparent; height: 100%;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-hit {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--bnz-border);
  background: #fff; display: grid; place-items: center; position: relative;
}
.icon-hit:hover { background: var(--bnz-surface-2); }
.ping {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px;
  background: var(--bnz-orange); border-radius: 50%;
}

#page-content, main.page {
  padding: 22px 24px 48px;
  max-width: 1280px;
  width: 100%;
}
main.page.wide, #page-content.wide { max-width: none; }

.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav);
  height: var(--bottom-h); background: rgba(11,11,12,.94); color: #fff;
  border-top: 1px solid #232328;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 10px; color: #a1a1aa; font-weight: var(--fw-sb);
}
.bottom-nav a.active { color: var(--bnz-orange); }

.cmd-backdrop {
  position: fixed; inset: 0; background: rgba(10,10,12,.45); z-index: var(--z-modal);
  display: grid; align-items: start; justify-content: center; padding: 12vh 16px 16px;
}
.cmdk {
  width: min(640px, 100%); background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cmdk input {
  width: 100%; border: 0; outline: none; padding: 16px 18px; font-size: 16px; border-bottom: 1px solid var(--bnz-border);
}
.cmdk .res { max-height: 380px; overflow: auto; padding: 8px; }
.cmdk .hit { width: 100%; text-align: left; padding: 10px; border-radius: 10px; display: flex; gap: 10px; align-items: center; }
.cmdk .hit:hover, .cmdk .hit.active { background: var(--bnz-bg); }

.proto-note {
  font-size: 11px; color: #71717a; padding: 8px 10px;
}

@media (max-width: 1100px) {
  .top-search span.hint { display: none; }
  .lang-switch button { min-width: 46px; padding: 0 10px; }
}
@media (max-width: 980px) {
  #app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  #page-content, main.page { padding: 16px 14px calc(var(--bottom-h) + 24px); }
  .topbar { padding: 0 12px; }
  .top-search span.hint { display: none; }
}
