/* Signed-in shell: sidebar + content. The shell markup is injected by js/dashboard.js. */
body.app { min-height: 100vh; }
.shell { display: block; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: 260px; max-width: 84vw;
  background: #0d0804; border-right: 1px solid var(--line);
  padding: 1rem 0.8rem; display: flex; flex-direction: column; gap: 1rem;
  transform: translateX(-100%); transition: transform 0.2s ease;
}
.sidebar.open { transform: none; }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.75); }
.side-nav { display: grid; gap: 2px; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem;
  border-radius: 9px; color: var(--muted); min-height: 42px;
}
.side-nav a:hover { background: rgba(65, 45, 21, 0.3); color: var(--text); text-decoration: none; }
.side-nav a[aria-current="page"] { background: var(--line); color: var(--text); font-weight: 600; border: 1px solid #634621; }
.side-nav .sep { margin: 0.7rem 0.7rem 0.2rem; color: var(--dim); font-size: 0.75rem; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 0.8rem 0.4rem 0; }
.side-foot .who { font-size: 0.85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 0.6rem; }

.main-col { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.7rem;
  min-height: 58px; padding: 0 1rem; background: rgba(0, 0, 0, 0.95);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
.topbar h1 { font-size: 1.05rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.menu-btn { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 9px; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }
.points-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.75rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--text);
  background: var(--card);
  font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap;
}
.points-chip:hover { text-decoration: none; border-color: var(--line-2); color: #ffffff; }
.points-chip.low { color: var(--warn); border-color: rgba(229, 169, 59, 0.5); }
#view { padding: 1rem 1rem 3rem; max-width: 1100px; }
#view > * + * { margin-top: 1rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.page-head h2 { font-size: 1.35rem; margin-bottom: 0.15rem; color: var(--text); }
.page-head p { color: var(--muted); margin: 0; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.two-col { display: grid; gap: 1rem; }
.bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 130px; padding-top: 0.5rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.35rem; height: 100%; min-width: 0; }
.bar { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #634621 0%, #412D15 100%); min-height: 3px; opacity: 0.95; }
.bar.zero { background: var(--card); border: 1px solid var(--line); opacity: 1; }
.bar-label { color: var(--dim); font-size: 0.72rem; }
.bar-val { color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.filters select { width: auto; min-width: 150px; }
.tabs { display: flex; gap: 0.3rem; overflow-x: auto; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 0.5rem 0.8rem; border-radius: 8px; font: inherit; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); background: rgba(65, 45, 21, 0.25); }
.tabs button[aria-selected="true"] { background: var(--line); color: var(--text); font-weight: 600; border: 1px solid #634621; }
.secret-box { display: grid; gap: 0.6rem; }
.secret-box .code { word-break: break-all; }
.balance-big { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.pkg-grid { display: grid; gap: 0.9rem; }
.scope-list { display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }

@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
  #view { padding: 1.4rem 1.6rem 3rem; }
}
@media (min-width: 960px) {
  .sidebar { transform: none; }
  .main-col { margin-left: 260px; }
  .menu-btn { display: none; }
  .scrim { display: none; }
  .pkg-grid { grid-template-columns: repeat(3, 1fr); }
}
