:root {
  --aaa-ink: #f9fbff;
  --aaa-muted: rgba(231, 237, 255, 0.74);
  --aaa-soft: rgba(231, 237, 255, 0.52);
  --aaa-night: #030716;
  --aaa-navy: #071333;
  --aaa-card: rgba(23, 35, 78, 0.48);
  --aaa-card-bright: rgba(255, 255, 255, 0.15);
  --aaa-line: rgba(184, 198, 255, 0.38);
  --aaa-blue: #1f7cff;
  --aaa-cyan: #23c8ff;
  --aaa-violet: #7c37ff;
  --aaa-magenta: #b735ff;
  --aaa-green: #47d78c;
  --aaa-red: #ff4f7a;
}

body.assistant-aaa-body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--aaa-ink);
  background:
    radial-gradient(circle at 82% 18%, rgba(123, 47, 255, 0.34), transparent 26%),
    radial-gradient(circle at 26% 52%, rgba(18, 94, 255, 0.24), transparent 34%),
    linear-gradient(135deg, #07101f 0%, #0a1330 44%, #13083b 100%);
  background-color: #0a1024;
  overflow-x: hidden;
}

body.assistant-aaa-body::before,
body.assistant-aaa-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.assistant-aaa-body::before {
  background:
    radial-gradient(ellipse at 100% 42%, rgba(167, 58, 255, 0.34), transparent 34%),
    repeating-linear-gradient(152deg, transparent 0 82px, rgba(80, 128, 255, .055) 84px, transparent 88px);
  opacity: .85;
}

body.assistant-aaa-body::after {
  background:
    linear-gradient(104deg, transparent 0 22%, rgba(30, 121, 255, .08) 30%, transparent 39%),
    linear-gradient(12deg, transparent 0 28%, rgba(153, 45, 255, .10) 38%, transparent 48%);
  filter: blur(.2px);
  mix-blend-mode: screen;
}

.assistant-aaa-shell {
  position: relative;
  z-index: 1;
  background: transparent;
}

.aaa-sidebar {
  width: 150px;
  padding: 18px 12px;
  gap: 16px;
  border-right: 1px solid rgba(149, 168, 255, .2);
  background: linear-gradient(180deg, rgba(7, 13, 39, .92), rgba(2, 6, 21, .78));
  box-shadow: 12px 0 48px rgba(0,0,0,.28), inset -1px 0 0 rgba(255,255,255,.04);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.aaa-logo-link {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 8px 0 16px;
  border-bottom: 1px solid rgba(201, 213, 255, .16);
}

.aaa-lightning-logo { width: 62px; height: 82px; object-fit: contain; }

.aaa-sidebar-nav { width: 100%; gap: 10px; margin-top: 6px; }

.aaa-nav-link,
.aaa-sidebar .sidebar-link,
.aaa-sidebar .sidebar-bottom-link {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: rgba(246, 249, 255, .88);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}

.aaa-nav-link svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(93, 122, 255, .16));
}

.aaa-nav-link:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 0 0 1px rgba(180, 197, 255, .12);
}

.aaa-nav-link.active {
  color: #fff;
  background:
    radial-gradient(circle at 88% 25%, rgba(174, 52, 255, .34), transparent 36%),
    linear-gradient(135deg, rgba(25, 116, 255, .72), rgba(102, 35, 213, .74));
  box-shadow: 0 12px 34px rgba(76, 41, 255, .36), inset 0 0 0 1px rgba(189, 202, 255, .18);
}

.aaa-nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--aaa-magenta), var(--aaa-cyan));
  box-shadow: 0 0 18px rgba(90, 123, 255, .9);
}

.aaa-admin-link {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 213, 255, .16);
}

.aaa-main-shell { background: transparent; min-width: 0; }

.aaa-topbar {
  height: 84px;
  padding: 0 28px 0 34px;
  border-bottom: 1px solid rgba(149, 168, 255, .18);
  background: rgba(4, 9, 31, .72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  display: flex;
  justify-content: space-between;
}

.aaa-topbar-brand,
.aaa-topbar-actions { display: flex; align-items: center; gap: 18px; }
.aaa-topbar-logo { width: 28px; height: 38px; }
.aaa-topbar-brand strong { font-size: 27px; letter-spacing: -.04em; }
.aaa-topbar-divider { width: 1px; height: 34px; background: rgba(186, 201, 255, .22); }
.aaa-topbar-title { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; opacity: .82; }
.aaa-crown { display: inline-grid; place-items: center; width: 34px; height: 26px; border-radius: 999px; background: rgba(34, 101, 255, .3); color: #6aa8ff; }

.aaa-top-add {
  height: 52px;
  padding: 0 26px;
  border-radius: 14px;
  background: linear-gradient(100deg, #1976ff, #5e58ff 48%, #a929ff);
  box-shadow: 0 14px 34px rgba(39, 108, 255, .24), 0 0 34px rgba(162, 60, 255, .28);
}

.aaa-icon-top {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  border: 1px solid rgba(173, 190, 255, .26);
  background: rgba(12, 18, 48, .58);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.aaa-icon-top svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.aaa-avatar { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(173, 190, 255, .3); background: rgba(255,255,255,.08); display: grid; place-items: center; position: relative; font-weight: 700; }
.aaa-avatar span { position: absolute; right: 4px; bottom: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--aaa-green); box-shadow: 0 0 14px rgba(71, 215, 140, .8); }

.aaa-assistant-page {
  position: relative;
  padding: 36px 44px 48px;
  min-height: calc(100vh - 84px);
  background:
    radial-gradient(ellipse at 82% 26%, rgba(132, 50, 255, .28), transparent 30%),
    radial-gradient(ellipse at 36% 52%, rgba(25, 111, 255, .18), transparent 28%);
}

.aaa-assistant-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(172deg, transparent 0 22%, rgba(46, 123, 255, .35) 23%, transparent 24%),
    linear-gradient(164deg, transparent 0 30%, rgba(157, 53, 255, .42) 31%, transparent 32%),
    linear-gradient(348deg, transparent 0 62%, rgba(123, 53, 255, .2) 63%, transparent 65%);
  filter: blur(1px);
  opacity: .8;
}

.aaa-glass-panel,
.aaa-answer-panel,
.aaa-prompt-row button {
  position: relative;
  border: 1px solid rgba(208, 218, 255, .46);
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.075)),
    rgba(24, 35, 75, .42);
  box-shadow: 0 20px 60px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
}

.assistant-hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 32px;
  align-items: stretch;
  border-radius: 26px;
  padding: 34px;
  overflow: hidden;
}

.assistant-hero::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -180px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 51, 255, .36), rgba(33, 124, 255, .15) 42%, transparent 70%);
  pointer-events: none;
}

.aaa-kicker { display: flex; align-items: center; gap: 10px; color: rgba(181, 199, 255, .88); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.aaa-kicker span { width: 5px; height: 28px; border-radius: 999px; background: linear-gradient(180deg, var(--aaa-blue), var(--aaa-magenta)); box-shadow: 0 0 16px rgba(123, 72, 255, .9); }
.assistant-hero h1 { margin: 12px 0 10px; color: #fff; font-size: clamp(42px, 6vw, 74px); line-height: .98; letter-spacing: -.06em; }
.assistant-hero p { margin: 0; max-width: 520px; color: var(--aaa-muted); font-size: 18px; line-height: 1.55; }

.aaa-ask-form { position: relative; z-index: 1; margin-top: 0; display: flex; flex-direction: column; gap: 12px; }
.aaa-field-label { color: rgba(255,255,255,.88); }
.aaa-question-wrap { position: relative; }
.aaa-question-icon { position: absolute; left: 20px; top: 21px; width: 26px; height: 26px; fill: none; stroke: #a98cff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; z-index: 2; }
.aaa-question-wrap textarea {
  min-height: 162px;
  padding: 22px 22px 22px 62px;
  border-radius: 20px;
  border: 1px solid rgba(208, 218, 255, .38);
  background: rgba(5, 10, 30, .52);
  color: #fff;
  font-size: 19px;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 0 34px rgba(77, 91, 255, .12);
}
.aaa-question-wrap textarea::placeholder { color: rgba(231,237,255,.56); }
.aaa-question-wrap textarea:focus { border-color: rgba(95, 190, 255, .9); box-shadow: 0 0 0 4px rgba(39, 108, 255, .16), 0 0 42px rgba(111, 62, 255, .22); }
.aaa-form-actions { display: flex; justify-content: flex-end; }
.aaa-ask-btn { display: inline-flex; align-items: center; gap: 13px; min-width: 160px; height: 58px; justify-content: center; border-radius: 16px; background: linear-gradient(100deg, #1976ff, #5e58ff 48%, #a929ff); }
.aaa-ask-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.aaa-prompt-row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.aaa-prompt-row button { min-height: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; border-radius: 16px; color: rgba(255,255,255,.9); cursor: pointer; font-size: 15px; font-weight: 600; }
.aaa-prompt-row button:hover { transform: translateY(-1px); border-color: rgba(111,190,255,.65); }
.aaa-prompt-row svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: #5fb0ff; }

.aaa-answer-panel { position: relative; z-index: 1; border-radius: 26px; padding: 26px; margin-top: 20px; }
.aaa-answer-header-stack { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.aaa-answer-header-stack h2 { margin: 8px 0 0; color: #fff; font-size: 34px; letter-spacing: -.04em; }
.aaa-answer-box { background: rgba(3, 8, 26, .56); border: 1px solid rgba(186, 201, 255, .22); border-radius: 20px; color: #f9fbff; min-height: 190px; padding: 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.aaa-empty-answer { min-height: 144px; display: flex; align-items: center; gap: 18px; color: var(--aaa-muted); }
.aaa-empty-answer svg { width: 46px; height: 46px; flex: 0 0 auto; fill: none; stroke: #7fb8ff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 14px rgba(39,108,255,.4)); }
.aaa-empty-answer strong { display: block; color: #fff; font-size: 20px; margin-bottom: 5px; }
.aaa-empty-answer span { color: var(--aaa-soft); }

.aaa-feedback-row { background: rgba(255,255,255,.1); border-color: rgba(208,218,255,.24); color: #fff; }
.aaa-feedback-row .feedback-label { color: rgba(255,255,255,.74); }

@media (max-width: 1100px) {
  .assistant-hero { grid-template-columns: 1fr; }
  .aaa-prompt-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .assistant-aaa-shell { flex-direction: column; }
  .aaa-sidebar { width: 100%; height: auto; flex-direction: row; overflow-x: auto; padding: 10px; }
  .aaa-logo-link { width: auto; border-bottom: 0; padding: 0 12px; }
  .aaa-lightning-logo { width: 34px; height: 46px; }
  .aaa-sidebar-nav { flex-direction: row; width: auto; }
  .aaa-nav-link, .aaa-sidebar .sidebar-link, .aaa-sidebar .sidebar-bottom-link { min-width: 84px; min-height: 62px; }
  .aaa-admin-link { border-top: 0; margin-top: 0; padding-top: 0; }
  .aaa-topbar { height: auto; padding: 16px; flex-wrap: wrap; gap: 12px; }
  .aaa-topbar-brand strong { font-size: 22px; }
  .aaa-topbar-title { font-size: 11px; letter-spacing: .1em; }
  .aaa-assistant-page { padding: 22px 14px; min-height: 100dvh; padding-bottom: 42px; }
  .assistant-hero { padding: 24px; border-radius: 22px; }
  .assistant-hero h1 { font-size: 42px; }
  .aaa-prompt-row { grid-template-columns: 1fr; }
  .aaa-answer-header-stack { flex-direction: column; }
}


/* NO SIDEBAR LAYOUT */
.no-sidebar-shell{
  display:block !important;
}

.no-sidebar-main{
  width:100%;
  margin-left:0 !important;
}

.no-sidebar-main .aaa-topbar{
  padding-left:42px;
}

@media (max-width:760px){
  .no-sidebar-main .aaa-topbar{
    padding-left:16px;
  }
}

/* Staff assistant revised roll-up interface */
.aaa-topbar-actions .aaa-top-add {
  display: none !important;
}

.assistant-hero {
  display: block;
  padding: 0;
}

.assistant-hero-content {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 30px;
  align-items: stretch;
  padding: 30px;
}

.assistant-hero h1 {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.aaa-rollup-bar {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(208, 218, 255, .44);
  border-radius: 22px;
  padding: 13px 16px;
  background:
    radial-gradient(circle at 9% 20%, rgba(35, 200, 255, .18), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  color: #fff;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 14px 36px rgba(0,0,0,.18);
}

.aaa-rollup-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(31,124,255,.75), rgba(183,53,255,.6));
  box-shadow: 0 0 22px rgba(77, 139, 255, .35);
  flex: 0 0 auto;
}

.aaa-rollup-hint {
  margin-left: auto;
  color: rgba(231,237,255,.66);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

#askPanel.is-collapsed {
  padding: 0;
  overflow: visible;
}

#askPanel.is-collapsed .aaa-ask-rollup {
  display: flex;
}

#askPanel.is-collapsed .assistant-hero-content {
  display: none;
}

#responsePanel {
  padding: 0;
  overflow: hidden;
}

#responsePanel .aaa-response-rollup {
  display: flex;
  border-radius: 22px 22px 0 0;
}

#responsePanel.is-collapsed .aaa-response-rollup {
  border-radius: 22px;
}

#responsePanel.is-collapsed .aaa-response-content {
  display: none;
}

.aaa-response-content {
  padding: 26px;
}

.aaa-top-questions-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aaa-top-questions-row button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aaa-top-questions-row small {
  color: rgba(231,237,255,.58);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.aaa-feedback-row {
  background:
    radial-gradient(circle at 0 0, rgba(35,200,255,.15), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.07));
  border: 1px solid rgba(208,218,255,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 34px rgba(0,0,0,.16);
}

.aaa-feedback-row .feedback-label {
  color: rgba(255,255,255,.78);
}

.aaa-feedback-row .feedback-btn {
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  border: 1px solid rgba(208,218,255,.28);
}

.aaa-feedback-row .feedback-btn.helpful {
  color: #eafff4;
  background: linear-gradient(135deg, rgba(71,215,140,.72), rgba(31,124,255,.5));
  box-shadow: 0 10px 24px rgba(71,215,140,.14);
}

.aaa-feedback-row .feedback-btn.not-helpful {
  color: #fff2f6;
  background: linear-gradient(135deg, rgba(255,79,122,.72), rgba(124,55,255,.45));
  box-shadow: 0 10px 24px rgba(255,79,122,.12);
}

.answer-certainty {
  margin: 8px 0 14px;
  padding: 12px 14px;
  border-radius: 15px;
  border: 1px solid rgba(245, 213, 159, .5);
  background: rgba(255, 244, 230, .08);
  color: rgba(255, 244, 230, .95);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.answer-certainty strong {
  color: #ffe8b8;
}

.answer-certainty span {
  color: rgba(255, 244, 230, .72);
  font-size: 13px;
  line-height: 1.4;
}

.answer-certainty-warning {
  border-color: rgba(255, 79, 122, .48);
  background: rgba(255, 79, 122, .09);
}

.answer-certainty-warning strong {
  color: #ffd5df;
}

.answer-certainty-warning span {
  color: rgba(255, 230, 236, .78);
}

.answer-sources-rollout {
  margin-top: 16px;
  border: 1px solid rgba(186, 201, 255, .2);
  border-radius: 15px;
  background: rgba(255,255,255,.055);
  overflow: hidden;
}

.answer-sources-rollout summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #dbe8ff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  list-style: none;
}

.answer-sources-rollout summary::-webkit-details-marker {
  display: none;
}

.answer-sources-rollout summary::after {
  content: " +";
  float: right;
  color: #7fb8ff;
}

.answer-sources-rollout[open] summary::after {
  content: " −";
}

.answer-sources-rollout .answer-sources {
  padding: 0 14px 14px;
}

.source-document-links {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-document-link,
.answer-link {
  color: #8fd9ff;
  text-decoration: none;
  font-weight: 600;
}

.source-document-link:hover,
.answer-link:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .assistant-hero-content {
    grid-template-columns: 1fr;
  }

  .aaa-top-questions-row {
    grid-template-columns: 1fr;
  }
}


/* Final staff ask/response behavior polish */
.aaa-top-questions-row.is-hidden {
  display: none !important;
}

.assistant-hero-copy h1,
.assistant-hero h1 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.assistant-hero-copy p {
  max-width: 420px;
}

.aaa-response-rollup #responseRollupTitle,
.aaa-ask-rollup #askPanelRollupTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-sources-rollout .source-document-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(143, 217, 255, .28);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(35, 200, 255, .08);
}


/* Collapsed rollup bars should feel unlit/inactive compared to open panels */
#askPanel.is-collapsed .aaa-ask-rollup,
#responsePanel.is-collapsed .aaa-response-rollup {
  border-color: rgba(97, 114, 168, 0.24);
  background:
    radial-gradient(circle at 8% 18%, rgba(31, 124, 255, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(5, 9, 27, 0.88), rgba(3, 6, 19, 0.94));
  color: rgba(231, 237, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.28);
}

#askPanel.is-collapsed .aaa-rollup-icon,
#responsePanel.is-collapsed .aaa-rollup-icon {
  background: linear-gradient(135deg, rgba(45, 58, 104, 0.78), rgba(39, 31, 75, 0.72));
  box-shadow: none;
  color: rgba(231, 237, 255, 0.58);
}

#askPanel.is-collapsed .aaa-rollup-hint,
#responsePanel.is-collapsed .aaa-rollup-hint {
  color: rgba(231, 237, 255, 0.42);
}


/* Tiny rollup/header behavior patch */
#askPanel.is-collapsed .aaa-ask-rollup .aaa-rollup-hint {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 14px rgba(143, 217, 255, 0.58);
}

#responsePanel:not(.has-answer) .aaa-answer-header-stack > div:first-child {
  display: none;
}

#responsePanel:not(.has-answer) .aaa-answer-header-stack {
  margin-bottom: 0;
}


/* Thinking state: keep response content hidden and animate the rolled-up response bar */
#responsePanel.is-thinking .aaa-response-content {
  display: none !important;
}

#responsePanel.is-thinking .aaa-response-rollup {
  display: flex;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border-color: rgba(143, 217, 255, 0.42);
  background:
    linear-gradient(
      90deg,
      rgba(5, 9, 27, 0.94) 0%,
      rgba(31, 124, 255, 0.42) 16.66%,
      rgba(124, 55, 255, 0.46) 33.33%,
      rgba(35, 200, 255, 0.34) 50%,
      rgba(183, 53, 255, 0.42) 66.66%,
      rgba(31, 124, 255, 0.42) 83.33%,
      rgba(5, 9, 27, 0.94) 100%
    );
  background-size: 200% 100%;
  animation: aaaThinkingSweep 2s linear infinite;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 34px rgba(31, 124, 255, 0.18),
    0 0 36px rgba(183, 53, 255, 0.16);
}

#responsePanel.is-thinking .aaa-response-rollup::after {
  display: none;
}

#responsePanel.is-thinking .aaa-response-rollup {
  animation: aaaThinkingSweep 2s linear infinite, aaaRollupSnapIn 0.2s ease-out both;
}

@keyframes aaaThinkingSweep {
  from { background-position: 200% 50%; }
  to { background-position: 0% 50%; }
}

@keyframes aaaThinkingShine {
  from { transform: translateX(110%); }
  to { transform: translateX(-110%); }
}


/* Fast rollup open/close animation polish */
.aaa-rollup-bar {
  transition:
    border-radius 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

#askPanel.is-collapsed .aaa-ask-rollup,
#responsePanel.is-collapsed .aaa-response-rollup,
#responsePanel.is-thinking .aaa-response-rollup {
  animation-name: aaaRollupSnapIn;
  animation-duration: 0.2s;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}

#responsePanel.is-thinking .aaa-response-rollup {
  animation: aaaThinkingSweep 2s ease-in-out infinite, aaaRollupSnapIn 0.2s ease-out both;
}

#responsePanel.is-thinking .aaa-response-rollup::after {
  animation: aaaThinkingShine 2s ease-in-out infinite;
}

.assistant-hero-content,
.aaa-response-content {
  animation: aaaRollupContentOpen 0.2s ease-out both;
  transform-origin: top;
}

@keyframes aaaRollupSnapIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scaleY(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes aaaRollupContentOpen {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}


/* Mobile/background continuity fixes */
html,
body {
  background-color: #0a1024;
}

.assistant-aaa-shell,
.aaa-main-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

@media (max-width: 760px) {
  html,
  body,
  body.assistant-aaa-body,
  .assistant-aaa-shell,
  .aaa-main-shell {
    background-color: #0a1024;
    min-height: 100dvh;
  }
}

/* Instant answer cache UI */
.answer-mode-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 10px 13px;
  border-radius: 15px;
  border: 1px solid rgba(186, 201, 255, .24);
  background: rgba(255,255,255,.06);
  color: rgba(249,251,255,.92);
}

.answer-mode-badge strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.answer-mode-badge span {
  color: rgba(231,237,255,.64);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.instant-answer-badge {
  border-color: rgba(35, 200, 255, .38);
  background:
    radial-gradient(circle at 0 0, rgba(35,200,255,.18), transparent 42%),
    linear-gradient(135deg, rgba(31,124,255,.18), rgba(183,53,255,.10));
  box-shadow: 0 0 26px rgba(35,200,255,.10);
}

.instant-answer-badge strong {
  color: #bdefff;
}

.deep-search-badge {
  border-color: rgba(124, 55, 255, .34);
  background:
    radial-gradient(circle at 0 0, rgba(124,55,255,.18), transparent 42%),
    rgba(255,255,255,.055);
}

.deep-search-badge strong {
  color: #d9c8ff;
}


/* Search status placement + thinking mode polish */
.answer-section .answer-mode-badge {
  margin: 14px 0 0;
}

#responsePanel.is-thinking.is-instant-thinking .aaa-response-rollup {
  border-color: rgba(35, 200, 255, 0.48);
  background:
    linear-gradient(
      90deg,
      rgba(5, 9, 27, 0.94) 0%,
      rgba(31, 124, 255, 0.38) 18%,
      rgba(35, 200, 255, 0.44) 36%,
      rgba(124, 55, 255, 0.34) 54%,
      rgba(31, 124, 255, 0.38) 72%,
      rgba(5, 9, 27, 0.94) 100%
    );
  background-size: 200% 100%;
}

#responsePanel.is-thinking.is-deep-thinking .aaa-response-rollup {
  border-color: rgba(183, 53, 255, 0.52);
  background:
    linear-gradient(
      90deg,
      rgba(5, 9, 27, 0.94) 0%,
      rgba(72, 45, 145, 0.42) 18%,
      rgba(124, 55, 255, 0.50) 36%,
      rgba(183, 53, 255, 0.42) 54%,
      rgba(31, 124, 255, 0.30) 72%,
      rgba(5, 9, 27, 0.94) 100%
    );
  background-size: 200% 100%;
}

#responsePanel.is-thinking .aaa-rollup-icon {
  font-size: 17px;
  line-height: 1;
}

#responsePanel.is-thinking.is-instant-thinking .aaa-rollup-icon {
  background: linear-gradient(135deg, rgba(31,124,255,.86), rgba(35,200,255,.68));
  color: #e9fbff;
  box-shadow: 0 0 22px rgba(35, 200, 255, 0.38);
}

#responsePanel.is-thinking.is-deep-thinking .aaa-rollup-icon {
  background: linear-gradient(135deg, rgba(124,55,255,.78), rgba(183,53,255,.62));
  color: #fff;
  box-shadow: 0 0 22px rgba(183, 53, 255, 0.32);
}

/* Home link + floating admin access */

.aaa-home-link{
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  color:#fff;
  transition:
    transform .16s ease,
    opacity .16s ease;
}

.aaa-home-link:hover{
  transform:translateY(-1px);
  opacity:.92;
}

.aaa-home-link strong{
  color:#fff;
}

.aaa-admin-corner-btn{
  position:fixed;
  right:22px;
  bottom:22px;
  width:56px;
  height:56px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:200;
  color:#fff;
  text-decoration:none;
  overflow:hidden;

  border:1px solid rgba(208,218,255,.34);

  background:
    radial-gradient(circle at 32% 24%, rgba(35,200,255,.22), transparent 42%),
    linear-gradient(135deg,
      rgba(31,124,255,.42),
      rgba(124,55,255,.44)
    ),
    rgba(7,12,32,.9);

  backdrop-filter:blur(18px) saturate(160%);
  -webkit-backdrop-filter:blur(18px) saturate(160%);

  box-shadow:
    0 14px 34px rgba(0,0,0,.34),
    0 0 26px rgba(124,55,255,.22),
    inset 0 1px 0 rgba(255,255,255,.16);

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.aaa-admin-corner-btn:hover{
  transform:translateY(-2px) scale(1.03);

  border-color:rgba(143,217,255,.62);

  box-shadow:
    0 18px 40px rgba(0,0,0,.42),
    0 0 34px rgba(35,200,255,.24),
    0 0 44px rgba(124,55,255,.24);
}

.aaa-admin-corner-btn svg{
  width:27px;
  height:27px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.75;
  stroke-linecap:round;
  stroke-linejoin:round;
  overflow:visible;
}

@media (max-width:760px){

  .aaa-admin-corner-btn{
    width:54px;
    height:54px;
    right:16px;
    bottom:16px;
  }

  .aaa-home-link{
    gap:10px;
  }
}

/* Feedback submitted status text fix */
.assistant-aaa-body #feedbackStatus,
.assistant-aaa-body .feedback-status,
.assistant-aaa-body .submitted-feedback-row #feedbackStatus {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.16);
}

/* Sticky header update */
.aaa-topbar,
.topbar.aaa-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
}


/* Assistant header company logo */
.aaa-assistant-header-brand {
  gap: 12px;
  min-width: 0;
}

.aaa-header-company-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  flex: 0 0 auto;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.aaa-header-company-logo-custom {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.aaa-assistant-header-brand .aaa-topbar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Logo + admin button polish v2 */
.assistant-aaa-body .aaa-header-company-logo,
.assistant-aaa-body .aaa-header-company-logo-custom {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.assistant-aaa-body .aaa-admin-corner-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.assistant-aaa-body .aaa-admin-corner-btn svg {
  display: block !important;
  width: 27px !important;
  height: 27px !important;
  overflow: visible !important;
}


/* Preserve answer formatting from approved knowledge entries */
.answer-main {
  white-space: normal;
}

.formatted-answer-line {
  display: block;
  min-height: 1.35em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.formatted-answer-bullet {
  padding-left: 1.15em;
  text-indent: -0.85em;
}

.formatted-answer-spacer {
  min-height: 0.7em;
}


/* Formatted answer body */
.answer-main {
  display: block;
  white-space: normal;
  font-weight: 500;
}

.answer-main .formatted-answer-line {
  display: block;
  min-height: 1.35em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.answer-main .formatted-answer-bullet {
  padding-left: 1.15em;
  text-indent: -0.85em;
}

.answer-main .formatted-answer-spacer {
  min-height: 0.8em;
}

.assistant-aaa-body .aaa-inquiry-corner-btn {
  right: 78px;
}

/* Full related knowledge entry rollout on staff answers */
.answer-full-entry-rollout {
  margin-top: 16px;
  border: 1px solid rgba(186, 201, 255, .24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(31, 124, 255, .08), rgba(124, 55, 255, .08)),
    rgba(255,255,255,.055);
  overflow: hidden;
}

.answer-full-entry-rollout summary {
  cursor: pointer;
  padding: 13px 15px;
  color: #dbe8ff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  list-style: none;
}

.answer-full-entry-rollout summary::-webkit-details-marker {
  display: none;
}

.answer-full-entry-rollout summary::after {
  content: " +";
  float: right;
  color: #b99bff;
}

.answer-full-entry-rollout[open] summary::after {
  content: " −";
}

.answer-full-entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px 14px;
}

.answer-full-entry-card {
  border: 1px solid rgba(186, 201, 255, .22);
  border-radius: 14px;
  background: rgba(7, 13, 39, .34);
  overflow: hidden;
}

.answer-full-entry-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px 11px;
  border-bottom: 1px solid rgba(186, 201, 255, .16);
}

.answer-full-entry-card-header div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.answer-full-entry-card-header span {
  color: #b9c9ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.answer-full-entry-card-header strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
}

.answer-full-entry-card-header small {
  color: rgba(219, 232, 255, .72);
  font-size: 12px;
}

.answer-full-entry-content {
  max-height: 380px;
  overflow: auto;
  margin: 14px;
  padding: 14px 15px;
  border: 1px solid rgba(186, 201, 255, .18);
  border-radius: 12px;
  background: rgba(255,255,255,.065);
  color: rgba(248, 251, 255, .94);
  font-size: 14px;
  line-height: 1.55;
}

.full-entry-line {
  display: block;
  min-height: 1.35em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.full-entry-bullet {
  padding-left: 1.15em;
  text-indent: -0.85em;
}

.full-entry-spacer {
  min-height: .72em;
}

.answer-full-entry-highlight {
  display: inline;
  padding: .08em .22em;
  border-radius: 6px;
  background: rgba(124, 55, 255, .33);
  box-shadow: 0 0 0 1px rgba(185, 155, 255, .38), 0 0 18px rgba(124, 55, 255, .18);
  color: #fff;
}

.answer-full-entry-card .source-document-links {
  margin: 0 14px 14px;
}

.answer-full-entry-card .source-document-link {
  background: rgba(35, 200, 255, .08);
}
