/* Purpose-built finishing layer for the mobile-inspired campus AI screen. */
.shell .ai-agent-workspace.ai-mobile-inspired {
  grid-template-columns: 216px minmax(0, 1fr) !important;
  background: radial-gradient(circle at 50% 32%, #f5faff 0, #ffffff 46%, #f8fbff 100%) !important;
  color: #29495f !important;
}
.shell .ai-agent-workspace.ai-mobile-inspired .ai-side-panel { background: linear-gradient(180deg, #f4f9ff, #fff) !important; border-right-color: #dce9f5 !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-panel { background: transparent !important; grid-template-rows: 64px minmax(0, 1fr) auto auto !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-panel::before, .shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-panel::after { display: none !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-head { border-bottom-color: #e1ebf5 !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-head h2, .shell .ai-agent-workspace.ai-mobile-inspired .ai-landing h3, .shell .ai-agent-workspace.ai-mobile-inspired .ai-message p { color: #29495f !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-head p, .shell .ai-agent-workspace.ai-mobile-inspired .ai-landing p, .shell .ai-agent-workspace.ai-mobile-inspired .ai-disclaimer { color: #7c94aa !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-service-pill { background: #f8fbff !important; border-color: #d7e7f5 !important; color: #59748d !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-side-action { background: #fff !important; border-color: #d8e7f5 !important; color: #58758f !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-side-action:hover, .shell .ai-agent-workspace.ai-mobile-inspired .ai-side-action.active, .shell .ai-agent-workspace.ai-mobile-inspired .ai-recents button:hover, .shell .ai-agent-workspace.ai-mobile-inspired .ai-recents button.active, .shell .ai-agent-workspace.ai-mobile-inspired .ai-conversation-item.active { background: #e7f5ff !important; border-color: #9bcbed !important; color: #3177b3 !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-recents button, .shell .ai-agent-workspace.ai-mobile-inspired .ai-recycle-action { color: #58758f !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-message > div { background: #fff !important; border-color: #dce9f5 !important; box-shadow: 0 6px 16px rgba(65,118,162,.07) !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-message.user > div { background: #e7f3ff !important; border-color: #c9e1f6 !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-suggestion-row button, .shell .ai-agent-workspace.ai-mobile-inspired .ai-composer-tools button { background: #f8fbff !important; border-color: #d7e7f4 !important; color: #547491 !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-composer { background: #fff !important; border-color: #dce8f3 !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-composer textarea { color: #35536a !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-model-mark { overflow:hidden; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-model-mark img { width:100%; height:100%; object-fit:contain; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-message-avatar { overflow:hidden; padding:2px; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-message-avatar img { width:100%; height:100%; object-fit:contain; border-radius:50%; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-message-avatar { background:#fff !important; border-color:#dce9f5 !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-message.user { display:flex !important; justify-content:flex-end; grid-template-columns:none !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-message.user > div { grid-column:auto !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-composer-tools [data-ai-image-mode] { display:flex !important; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-composer-tools [data-ai-agent-toggle].active { background:#e2f5ff !important; border-color:#3aa9e8 !important; color:#0876b4 !important; box-shadow:0 0 0 2px rgba(58,169,232,.15); }
.shell .ai-agent-workspace .ai-agent-actions { margin:12px 0 4px; padding:10px 12px; border:1px solid #d7e7f4; border-radius:12px; background:rgba(235,246,255,.7); }
.shell .ai-agent-workspace .ai-agent-actions > strong { display:block; margin-bottom:6px; color:#3f6b8b; font-size:12px; }
.shell .ai-agent-workspace .ai-agent-action { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; border-top:1px dashed #c9ddea; font-size:12px; color:#31546d; }
.shell .ai-agent-workspace .ai-agent-action:first-of-type { border-top:0; }
.shell .ai-agent-workspace .ai-agent-action span { display:flex; flex-direction:column; gap:2px; min-width:0; }
.shell .ai-agent-workspace .ai-agent-action small { color:#6d8ba0; }
.shell .ai-agent-workspace .ai-agent-action button { border:1px solid #4f9dcc; border-radius:8px; padding:4px 8px; background:#fff; color:#17658c; cursor:pointer; white-space:nowrap; }
.shell .ai-agent-workspace .ai-agent-action.done button { border-color:#8ac9aa; color:#21754a; }
.shell .ai-agent-workspace .ai-agent-action.cancelled button, .shell .ai-agent-workspace .ai-agent-action.error button { border-color:#d7a0a0; color:#a44b4b; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-composer-tools [data-ai-agent-toggle].active { background:#183f5b !important; border-color:#58baf0 !important; color:#cdeeff !important; }
html:not([data-theme="day"]) .shell .ai-agent-workspace .ai-agent-actions { border-color:#315276; background:rgba(18,39,66,.85); }
html:not([data-theme="day"]) .shell .ai-agent-workspace .ai-agent-actions > strong, html:not([data-theme="day"]) .shell .ai-agent-workspace .ai-agent-action { color:#cde4ff; }
html:not([data-theme="day"]) .shell .ai-agent-workspace .ai-agent-action { border-color:#315276; }
html:not([data-theme="day"]) .shell .ai-agent-workspace .ai-agent-action small { color:#8eacc4; }
html:not([data-theme="day"]) .shell .ai-agent-workspace .ai-agent-action button { background:#122742; border-color:#4f86ad; color:#cde4ff; }
.lab-approval-groups { display:flex; gap:8px; margin:12px 0 4px; padding:4px; border:1px solid rgba(116,171,205,.3); border-radius:12px; width:max-content; }
.lab-approval-group { border:0; border-radius:8px; padding:7px 16px; background:transparent; color:var(--muted,#6d8ba0); cursor:pointer; font-weight:600; }
.lab-approval-group.active { background:var(--accent,#1e9bd1); color:#fff; }
html:not([data-theme="day"]) .lab-approval-group { color:#9abbd2; }
.shell .ai-agent-workspace.ai-mobile-inspired [data-ai-voice].is-listening { background:#ffe3ed !important; border-color:#f2a4bd !important; color:#b64f78 !important; animation:ai-voice-pulse 1.2s ease-in-out infinite; }
@keyframes ai-voice-pulse { 0%,100% { box-shadow:0 0 0 0 rgba(226,111,153,.18); } 50% { box-shadow:0 0 0 6px rgba(226,111,153,.12); } }

/* Keep the AI workspace legible when the campus shell uses the night theme. */
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired {
  background:radial-gradient(circle at 50% 20%, #1b3153 0, #101d34 48%, #0a1426 100%) !important;
  color:#eaf3ff !important;
  border-color:#29496c !important;
}
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-side-panel,
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-composer {
  background:#0f1d33 !important;
  border-color:#2a4668 !important;
}
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-head { border-bottom-color:#2a4668 !important; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-head h2,
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-landing h3,
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-message p { color:#eaf3ff !important; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-chat-head p,
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-landing p,
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-disclaimer { color:#9db1cf !important; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-message > div { background:#152945 !important; border-color:#315276 !important; box-shadow:0 8px 20px rgba(0,0,0,.2) !important; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-message.user > div { background:#1d3d67 !important; border-color:#3c6592 !important; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-suggestion-row button,
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-composer-tools button { background:#122742 !important; border-color:#315276 !important; color:#cde4ff !important; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-composer textarea { color:#eaf3ff !important; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-composer textarea::placeholder { color:#8ea8ca !important; }

@media (min-width:821px) {
  .shell.sidebar-collapsed { grid-template-columns:76px minmax(0,1fr) !important; }
  .shell.sidebar-collapsed .sidebar { padding-inline:10px !important; }
  .shell.sidebar-collapsed .brand > div,
  .shell.sidebar-collapsed .nav button > span:last-child,
  .shell.sidebar-collapsed .sidebar-card { display:none !important; }
  .shell.sidebar-collapsed .brand { justify-content:center; }
  .shell.sidebar-collapsed .brand img { width:42px; height:42px; }
  .shell.sidebar-collapsed .nav button { justify-content:center; padding-inline:0; }
  .shell.sidebar-collapsed .nav button .nav-icon { margin:0; }
}
@media (max-width:1050px) {
  .shell .ai-agent-workspace.ai-mobile-inspired { grid-template-columns:1fr !important; }
  .shell .ai-agent-workspace.ai-mobile-inspired .ai-side-panel { display:none !important; }
}
@media (max-width:820px) {
  .shell .ai-agent-workspace.ai-mobile-inspired { height:calc(100vh - 82px) !important; min-height:540px !important; }
  .shell .ai-agent-workspace.ai-mobile-inspired .ai-side-panel { display:none !important; }
}

/* Local WebGL pet: the canvas is interactive while the existing mascot remains a no-WebGL fallback. */
.shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-host { position:relative; width:144px; height:144px; margin:0 auto 6px; border:0; background:transparent; cursor:pointer; touch-action:none; user-select:none; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-host canvas { position:relative; z-index:1; display:block; width:100%; height:100%; outline:0; opacity:0; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-host.webgl-ready canvas { opacity:1; }
.shell .ai-agent-workspace.ai-mobile-inspired [data-ai-pet-status] { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-host:focus-visible { border-radius:50%; outline:3px solid #55b8ec; outline-offset:4px; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-fallback { position:absolute; inset:0; width:100%; height:100%; max-height:none; object-fit:contain; transition:opacity .18s ease; }
.shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-host.webgl-ready .ai-pet-fallback { opacity:0; pointer-events:none; }
html:not([data-theme="day"]) .shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-host { filter:drop-shadow(0 8px 16px rgba(74,164,255,.22)); }
@media (prefers-reduced-motion:reduce) { .shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-fallback { transition:none; } }
@media (max-width:820px) { .shell .ai-agent-workspace.ai-mobile-inspired .ai-pet-host { width:116px; height:116px; } }

.ai-admin-tabs { display:flex; gap:8px; margin:0 0 18px; padding:4px; border-radius:12px; background:var(--panel-2, #eef5fb); }
.ai-admin-tabs button { flex:1; min-height:40px; padding:0 14px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--muted, #7290a7); font-weight:700; cursor:pointer; }
.ai-admin-tabs button.active { border-color:#b8d8ef; background:#fff; color:#2577a9; box-shadow:0 3px 10px rgba(47,113,157,.12); }
.ai-admin-panel[hidden] { display:none !important; }
.ai-admin-panel > .muted { margin-top:-6px; margin-bottom:15px; }
.ai-ocr-status { display:flex; align-items:center; gap:10px; margin-top:12px; color:var(--muted, #7290a7); font-size:13px; }
