/* This sheet styles the admin shell. The chat's own theme lives in its shadow root. */
html:has(body[data-scope="admin"] .admin-layout[data-admin-screen="assistant"]) {
  background: #141614 !important;
  overflow: hidden;
}

body[data-scope="admin"]:has(.admin-layout[data-admin-screen="assistant"]) {
  --assistant-shell-ink: #eef0e8;
  --assistant-shell-edge: rgb(200 205 172 / 18%);
  background:
    radial-gradient(ellipse at 90% 2%, rgb(159 166 88 / 16%), transparent 42%),
    linear-gradient(148deg, #111310 12%, #222621 68%, #141614 100%) !important;
}

body[data-scope="admin"]:has(.admin-layout[data-admin-screen="assistant"]) :is(
  #app, .app[data-scope="admin"], .admin-gate, .admin-gate-content, .admin-shell,
  .admin-root, .admin-layout, .admin-content, .admin-viewport
) {
  --bg: transparent !important;
  background: transparent !important;
}

body[data-scope="admin"]:has(.admin-layout[data-admin-screen="assistant"]) .app[data-scope="admin"] > .header {
  color: var(--assistant-shell-ink) !important;
  background: rgb(20 23 19 / 85%) !important;
  border-bottom-color: var(--assistant-shell-edge) !important;
  backdrop-filter: blur(16px);
}

body[data-scope="admin"]:has(.admin-layout[data-admin-screen="assistant"]) .header .admin-logo {
  filter: brightness(0) invert(.94) !important;
}

body[data-scope="admin"]:has(.admin-layout[data-admin-screen="assistant"]) .header .admin-account-btn {
  color: var(--assistant-shell-ink) !important;
}

body[data-scope="admin"]:has(.admin-layout[data-admin-screen="assistant"]) .header .admin-account-btn__avatar {
  outline: 1px solid var(--assistant-shell-edge);
}

[data-admin-mobile-toolbar="1"] [data-id="assistant"] .admin-mobile-toolbar__icon {
  width: 30px !important;
  height: 30px !important;
}

.admin-assistant-orb {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 1px solid #a4ac68;
  border-radius: 50%;
  background: #11130c;
  font: 700 11px/1 system-ui, sans-serif;
  text-shadow: 0 1px 2px #11130c;
  box-shadow: inset 0 0 6px #070904, 0 0 8px rgb(148 157 79 / 56%);
}

[data-admin-mobile-toolbar="1"] [data-id="assistant"] .admin-assistant-orb {
  color: #fff !important;
  -webkit-text-fill-color: currentColor !important;
}

.admin-assistant-orb::before,
.admin-assistant-orb::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }

.admin-assistant-orb::before {
  inset: -36%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 65% 28%, #dce296 0%, #a0ad56 13%, transparent 29%),
    radial-gradient(ellipse at 36% 70%, #72843a 0%, #3c4a20 24%, transparent 46%),
    conic-gradient(from 150deg, #11130b, #3f4b22, #8f9b4c, #151910, #10120b);
  transform: rotate(-22deg);
  animation: admin-assistant-orb-flow 7s linear infinite;
}

.admin-assistant-orb::after {
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 67% 22%, rgb(241 245 187 / 50%), transparent 38%);
  box-shadow: inset 0 -5px 7px #090b07, inset 0 0 0 1px rgb(204 215 132 / 36%);
}

@keyframes admin-assistant-orb-flow { to { transform: rotate(338deg); } }

@media (max-width: 900px) {
  body[data-scope="admin"] .app:has(.admin-layout[data-admin-screen="assistant"]) {
    padding-bottom: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-assistant-orb::before { animation: none; }
}
