/*
 * Account Shell v2.1 (LAT-1042) — the account INDEX frame.
 *
 * Activates ONLY on account.mcpanalytics.ai (js/account-shell.js adds
 * html.acct-shell-on). A persistent LEFT SIDEBAR frames every account
 * surface; Create Analysis is the centered default view after login.
 * Replaces the marketing header/footer AND account-app's internal sidebar.
 * On mcpanalytics.ai the same pages keep the marketing chrome — inert there.
 * Mobile (<900px): the sidebar collapses to a fixed top bar.
 */

html.acct-shell-on #sticky-banner,
html.acct-shell-on footer.footer,
html.acct-shell-on .account-sidebar,
html.acct-shell-on .sidebar-toggle,
html.acct-shell-on .sidebar-overlay {
  display: none !important;
}

html.acct-shell-on body {
  padding-left: 232px !important;
}

/* account-app's two-column layout collapses to one — the shell owns nav */
html.acct-shell-on .account-layout {
  display: block !important;
}

.acct-shell {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 232px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: #0b0b0d;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Geist', -apple-system, sans-serif;
  overflow-y: auto;
}

.acct-shell-brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 1.1rem 1rem 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.acct-shell-brand strong {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.acct-shell-brand span {
  font-family: 'Geist Mono', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ff7b00;
  border: 1px solid rgba(255, 123, 0, 0.35);
  border-radius: 3px;
  padding: 0.08rem 0.32rem;
}

.acct-shell-nav {
  flex: 1;
  padding: 0.9rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* The centerpiece action — reads as a button, not a nav row */
.acct-shell-primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.25rem 0.9rem;
  padding: 0.6rem 0.8rem;
  background: #ff7b00;
  color: #0b0b0d;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: 8px;
  transition: filter 0.15s ease;
}

.acct-shell-primary:hover { filter: brightness(1.08); }

.acct-shell-primary.active {
  outline: 2px solid rgba(255, 123, 0, 0.45);
  outline-offset: 2px;
}

.acct-shell-group {
  font-family: 'Geist Mono', monospace;
  font-size: 0.58rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #565b64;
  padding: 0.85rem 0.85rem 0.3rem;
}

.acct-shell-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  color: #9ca3af;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.12s ease, background 0.12s ease;
}

.acct-shell-item:hover {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.04);
}

.acct-shell-item.active {
  color: #fff;
  background: rgba(255, 123, 0, 0.13);
  box-shadow: inset 2px 0 0 #ff7b00;
}

.acct-shell-foot {
  padding: 0.8rem 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.acct-shell-user {
  color: #6b7280;
  font-size: 0.72rem;
  font-family: 'Geist Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.45rem;
}

.acct-shell-signout {
  display: inline-block;
  color: #9ca3af;
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
}

.acct-shell-signout:hover { color: #e5e7eb; }

/* ── Mobile: sidebar becomes a top bar ── */
@media (max-width: 900px) {
  html.acct-shell-on body {
    padding-left: 0 !important;
    padding-top: 52px !important;
  }
  .acct-shell {
    top: 0; left: 0; right: 0; bottom: auto;
    width: auto;
    height: 52px;
    flex-direction: row;
    align-items: center;
    overflow-y: hidden;
    overflow-x: auto;
    scrollbar-width: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .acct-shell::-webkit-scrollbar { display: none; }
  .acct-shell-brand { border-bottom: none; padding: 0 0.75rem; flex-shrink: 0; }
  .acct-shell-brand strong { display: none; }
  .acct-shell-nav { flex-direction: row; align-items: center; padding: 0 0.25rem; gap: 0.15rem; }
  .acct-shell-primary { margin: 0 0.3rem; padding: 0.35rem 0.7rem; white-space: nowrap; }
  .acct-shell-group { display: none; }
  .acct-shell-item { padding: 0.35rem 0.6rem; white-space: nowrap; }
  .acct-shell-item.active { box-shadow: inset 0 -2px 0 #ff7b00; }
  .acct-shell-foot { border-top: none; padding: 0 0.6rem; flex-shrink: 0; }
  .acct-shell-user { display: none; }
}
