/* ═══════════════════════════════════════════
   uQuant · Sidebar Layout
   Shared across scanner.html + scalping.html
═══════════════════════════════════════════ */

/* ─── APP SHELL ─────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ───────────────────────────── */
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo .logo-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 12px; font-weight: 800;
  color: #fff; letter-spacing: -0.3px; flex-shrink: 0;
}
.sidebar-logo .logo-name {
  font-family: var(--display); font-size: 17px;
  font-weight: 800; color: var(--text); letter-spacing: -0.5px;
}
.sidebar-logo .logo-ver {
  font-size: 10px; color: var(--text3); font-family: var(--mono);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 8px 10px 6px;
  display: block;
}

.snav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.snav-item:hover {
  background: var(--bg3);
  color: var(--text);
}
.snav-item.active {
  background: rgba(0,200,150,.12);
  color: var(--accent);
  font-weight: 600;
}
.snav-item.active .snav-icon { opacity: 1; }
.snav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  opacity: .7;
}
.snav-item.sn-scalping.active {
  background: rgba(79,142,247,.12);
  color: var(--blue);
}

/* ─── SIDEBAR FOOTER ────────────────────── */
.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sidebar-footer .ver-tag {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--mono);
  padding: 0 4px;
}
.sb-theme-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.sb-theme-btn:hover { background: var(--bg4); color: var(--text); }

/* ─── CONTENT AREA ──────────────────────── */
.app-content {
  margin-left: 232px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ─── CONTENT TOP BAR ───────────────────── */
.content-topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0 28px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── MAIN CONTENT ──────────────────────── */
.content-body {
  flex: 1;
  padding: 24px 28px;
  max-width: 1400px;
  width: 100%;
}

/* ─── HAMBURGER (mobile only) ───────────── */
.sb-hamburger {
  display: none;
  width: 34px; height: 34px;
  border-radius: 7px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sb-overlay.show { display: block; }

/* ─── RESPONSIVE ────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0,0,0,.4);
  }
  .app-content {
    margin-left: 0;
  }
  .sb-hamburger {
    display: flex;
  }
  .content-topbar {
    justify-content: space-between;
    padding: 0 16px;
  }
  .content-body {
    padding: 16px;
  }
}
