/*
 * Account Shell v3 (LAT-1042 / LAT-1304) — 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.
 *
 * LAT-1304: reskinned WHITE on the #C65000 accent to match the creator
 * (create-analysis), with monoline nav icons (variant A). Was dark #0b0b0d.
 */

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: #fff;
  border-right: 1px solid #e2e8f0;
  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 #f1f5f9;
}

.acct-shell-brand strong {
  color: #0f172a;
  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: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #C65000;
  background: #fff7ed;
  border: 1px solid rgba(198, 80, 0, 0.28);
  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: #C65000;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(198, 80, 0, 0.22);
  transition: background 0.15s ease;
}

.acct-shell-primary:hover { background: #a84400; }

.acct-shell-primary.active {
  outline: 2px solid rgba(198, 80, 0, 0.4);
  outline-offset: 2px;
}

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

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

/* variant A: monoline icons, muted grey → accent on the active row */
.acct-shell-item svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: #94a3b8;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.12s ease;
}

.acct-shell-item:hover {
  color: #0f172a;
  background: #f8fafc;
}
.acct-shell-item:hover svg { stroke: #64748b; }

.acct-shell-item.active {
  color: #C65000;
  font-weight: 600;
  background: #fff7ed;
  box-shadow: inset 2px 0 0 #C65000;
}
.acct-shell-item.active svg { stroke: #C65000; }

/* "Soon" placeholder pill (LAT-1305 — Run/Modify analysis) */
.acct-shell-soon {
  margin-left: auto;
  font-family: 'Geist Mono', monospace;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}

.acct-shell-foot {
  padding: 0.8rem 0.85rem 1rem;
  border-top: 1px solid #f1f5f9;
}

.acct-shell-user {
  color: #64748b;
  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: #475569;
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
}

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

/* ── 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 #e2e8f0;
  }
  .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.4rem 0.6rem; white-space: nowrap; }
  .acct-shell-item.active { box-shadow: inset 0 -2px 0 #C65000; }
  .acct-shell-foot { border-top: none; padding: 0 0.6rem; flex-shrink: 0; }
  .acct-shell-user { display: none; }
}
