/* ─────────────────────────────────────────────────────────────
   VirtuVerse Admin Portal — sidebar shell
   ───────────────────────────────────────────────────────────── */

/* ── Sidebar ────────────────────────────────────────────────── */

.portal-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 210px;
  height: 100vh;
  background: #09090d;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

/* Brand */
.portal-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.portal-brand-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
}
.portal-brand-badge {
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e94560;
  background: rgba(233,69,96,0.1);
  border: 1px solid rgba(233,69,96,0.2);
  border-radius: 3px;
  padding: 2px 5px;
}

/* Nav */
.portal-nav {
  flex: 1;
  padding: 10px 8px;
  overflow-y: auto;
}

.portal-nav-group {
  margin-bottom: 18px;
}

.portal-nav-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a3a44;
  padding: 0 8px 5px;
}

a.portal-nav-item {
  display: block;
  padding: 7px 10px;
  font-size: 0.82rem;
  color: #5a5a6e;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.1s, color 0.1s;
  margin-bottom: 1px;
}
a.portal-nav-item:hover { background: rgba(255,255,255,0.04); color: #bbb; }
a.portal-nav-item.active {
  background: rgba(233,69,96,0.1);
  color: #e94560;
}

/* API Key section */
.portal-key-section {
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.portal-key-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a3a44;
  margin-bottom: 6px;
}
.portal-key-input {
  width: 100%;
  padding: 7px 9px;
  background: #111118;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  color: #eee;
  font-size: 0.75rem;
  font-family: monospace;
  outline: none;
  margin-bottom: 6px;
  box-sizing: border-box;
}
.portal-key-input:focus { border-color: rgba(233,69,96,0.5); }
.portal-key-input.has-key { border-color: rgba(74,222,128,0.3); color: #4ade80; }
a.portal-key-link {
  font-size: 0.71rem;
  color: #3a3a44;
  text-decoration: none;
  display: block;
  transition: color 0.15s;
}
a.portal-key-link:hover { color: #e94560; }

/* ── Footer (logout) ────────────────────────────────────────── */

.portal-footer {
  padding: 10px 12px 14px;
  flex-shrink: 0;
}

.portal-logout-btn {
  width: 100%;
  padding: 7px 10px;
  background: none;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  color: #3a3a44;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-align: center;
}
.portal-logout-btn:hover {
  color: #e94560;
  border-color: rgba(233,69,96,0.3);
}

/* ── Main content area ──────────────────────────────────────── */

.portal-main {
  margin-left: 210px;
  min-height: 100vh;
}

/* ── Admin-only controls on public pages ─────────────────────────────────────
   Hidden unless demo/portal.js confirms an admin session and adds `vv-admin` to <html>.
   Hidden is the default, so visitors never see a destructive control flash in and out.
   Presentation only — every endpoint behind these controls enforces its own auth. */
html:not(.vv-admin) .admin-only { display: none; }

.portal-footer { display: flex; flex-direction: column; gap: 6px; }
