/* ============================================================
   Shared dashboard shell — persistent left sidebar + top bar.
   Injected by shell.js into: network, transactions, partner-deals,
   marketplace. Self-contained; relies only on brand.css variables.
   ============================================================ */
:root { --shell-w: 236px; }

.shell-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--shell-w); z-index: 60;
  background: #04060B; border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  transform: translateX(0); transition: transform 0.22s ease;
}
.shell-brand { display: flex; align-items: center; gap: 12px; padding: 8px 12px 22px;
  font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.shell-brand svg { width: 30px; height: 30px; }
.shell-sec { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); padding: 16px 12px 8px; }
.shell-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-soft); font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.12s; position: relative; text-decoration: none; }
.shell-link:hover { background: rgba(255,255,255,0.04); color: var(--ink); }
.shell-link.active { background: linear-gradient(90deg, rgba(107,227,214,0.10), rgba(110,124,255,0.04)); color: var(--ink); }
.shell-link.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--accent); border-radius: 0 3px 3px 0; }
.shell-link svg { width: 18px; height: 18px; color: var(--ink-mute); }
.shell-link.active svg { color: var(--accent); }
.shell-link.locked { color: var(--ink-dim); }
.shell-link.locked .lock { margin-left: auto; opacity: 0.6; }
.shell-foot { margin-top: auto; padding: 16px 12px; border-top: 1px solid var(--line); }
.shell-foot small { color: var(--ink-dim); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; }

/* Top bar (mobile shows burger; desktop shows page title) */
.shell-appbar {
  position: sticky; top: 0; z-index: 50; height: 58px;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(7,9,15,0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.shell-burger { background: none; border: 0; width: 44px; height: 44px; border-radius: 10px; display: none; place-items: center; color: var(--ink-soft); cursor: pointer; }
.shell-burger:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.shell-title { font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); }
.shell-appbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Floating burger for pages that keep their own top bar (marketplace / partner-deals) */
.shell-fab-burger { display: none; position: fixed; top: 10px; left: 10px; z-index: 70; width: 44px; height: 44px; border-radius: 12px;
  background: rgba(7,9,15,0.9); border: 1px solid var(--line); color: var(--ink); place-items: center; cursor: pointer; backdrop-filter: blur(8px); }

/* Content column sits to the right of the fixed sidebar */
.shell-content { margin-left: var(--shell-w); min-height: 100vh; }

/* Backdrop for mobile drawer */
.shell-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.shell-backdrop.open { opacity: 1; pointer-events: auto; }
body.shell-drawer-open { overflow: hidden; }

/* Breakpoint matches the dashboard's own sidebar (desktop ≥ 1024px) */
@media (max-width: 1023px) {
  .shell-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  .shell-sidebar.open { transform: translateX(0); }
  .shell-content { margin-left: 0; }
  .shell-burger { display: grid; }
  .shell-fab-burger { display: grid; }
}

/* ---------- Loader (single CSS spinner, GPU-composited) ---------- */
.shell-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 60px 20px; color: var(--ink-mute); }
.shell-loader .ring { width: 54px; height: 54px; position: relative; }
.shell-loader .ring svg { width: 100%; height: 100%; animation: shell-spin 1s linear infinite; will-change: transform; }
.shell-loader .msg { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
@keyframes shell-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .shell-loader .ring svg { animation-duration: 2.4s; }
  .shell-sidebar, .shell-backdrop { transition: none; }
}
