/* Cósmica Universo: Astra is one assistant; model and node diagnostics stay private. */
:root {
  --cosmic-ink: #080b16;
  --cosmic-outline: rgba(125, 139, 186, .20);
  --cosmic-violet: rgba(120, 76, 188, .17);
}
html, body, #appView.app { background: var(--cosmic-ink); }
#nodeBadge, #runtimeStatus, #modelControl, #autoRoutingBadge,
.message-runtime, .fineprint { display: none !important; }
.sidebar {
  position: relative;
  isolation: isolate;
  border-right-color: var(--cosmic-outline);
  background: radial-gradient(ellipse at 8% 5%, rgba(128, 71, 173, .14), transparent 52%),
    linear-gradient(165deg, #10152b, #090d19 75%);
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  pointer-events: none; opacity: .43;
  background-image:
    radial-gradient(1px 1px at 28px 42px, rgba(218, 224, 255, .85) 95%, transparent),
    radial-gradient(1px 1px at 173px 189px, rgba(136, 211, 247, .75) 95%, transparent),
    radial-gradient(1px 1px at 218px 89px, rgba(240, 173, 224, .6) 95%, transparent);
  background-size: 257px 277px, 307px 331px, 361px 389px;
}
.brand-row { gap: 12px; }
.brand-row strong { font-size: 16px; letter-spacing: -.015em; }
.brand-row span { color: #9ba9c9; }
.brand-mark {
  background: linear-gradient(145deg, #ef1b55, #c8063d 65%, #8e1450);
  box-shadow: 0 9px 29px rgba(225, 6, 58, .20), 0 0 18px rgba(116, 74, 177, .10);
}
.owner-status-access {
  margin-left: auto; width: 34px; height: 34px; padding: 0;
  display: grid; place-items: center; border: 1px solid var(--cosmic-outline);
  border-radius: 11px; background: rgba(30, 37, 64, .55);
  color: #b4c0dc; font-size: 18px; line-height: 1;
}
.owner-status-access:hover, .owner-status-access:focus-visible {
  background: rgba(65, 54, 99, .72); border-color: rgba(193, 144, 232, .56); color: #fff;
}
.sidebar-actions .secondary {
  min-height: 43px; border-radius: 13px; border-color: rgba(137, 143, 187, .24);
  background: linear-gradient(130deg, rgba(41, 43, 72, .94), rgba(25, 33, 60, .93));
}
.session-item { border-radius: 13px; padding: 12px 13px; }
.session-item.active {
  border-color: rgba(194, 98, 177, .35);
  background: linear-gradient(110deg, rgba(106, 54, 121, .24), rgba(33, 48, 77, .50));
  box-shadow: inset 3px 0 0 rgba(234, 38, 96, .75);
}
.sidebar-bottom { border-top-color: var(--cosmic-outline); }
.chat-panel {
  position: relative; isolation: isolate;
  background: radial-gradient(ellipse 70% 58% at 94% 7%, var(--cosmic-violet), transparent 73%),
    radial-gradient(ellipse 62% 49% at 8% 82%, rgba(30, 118, 152, .10), transparent 75%),
    linear-gradient(180deg, #0a0d1b, #090c18 78%);
}
.chat-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  pointer-events: none; opacity: .35;
  background-image:
    radial-gradient(1px 1px at 51px 87px, rgba(219, 227, 255, .8) 95%, transparent),
    radial-gradient(1px 1px at 294px 220px, rgba(209, 170, 252, .60) 95%, transparent);
  background-size: 421px 367px, 563px 449px;
}
.compact-header { background: rgba(12, 17, 31, .64); border-bottom-color: rgba(125, 139, 186, .16); }
.compact-header h2 { color: #e7e9f5; }
.messages { width: min(950px, 100%); }
.message .role { color: #889ac0; letter-spacing: .13em; }
.message.user .bubble {
  border: 1px solid rgba(125, 139, 186, .19);
  border-radius: 17px 17px 5px 17px;
  background: linear-gradient(135deg, rgba(48, 55, 85, .85), rgba(26, 36, 60, .95));
}
.message.assistant .bubble { color: #e8ebf5; line-height: 1.72; }
.message.assistant .role { color: #eab0c9; }
.composer-wrap {
  border-radius: 20px; border-color: rgba(128, 139, 185, .29);
  background: linear-gradient(125deg, rgba(28, 32, 55, .97), rgba(15, 21, 38, .98));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .33), 0 0 26px rgba(119, 67, 186, .07);
}
.composer-wrap:focus-within { border-color: rgba(223, 63, 123, .52); }
#messageInput { color: #f4f5fc; }
#messageInput::placeholder { color: #8691ae; }
.send { background: linear-gradient(140deg, #f01955, #d40642 70%, #a00c66); }
.composer-controls:has(#contextControl.hidden) { display: none !important; }
.composer-controls { border-top-color: rgba(128, 138, 181, .14); }
.composer-controls #contextControl { border-color: var(--cosmic-outline); background: rgba(31, 40, 66, .48); }
.status-card, .status-job { border-color: var(--cosmic-outline); background: rgba(19, 25, 43, .90); }
button:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgba(227, 120, 202, .8); outline-offset: 2px;
}
@media (max-width: 760px) {
  .sidebar { border-bottom-color: var(--cosmic-outline); }
  .sidebar-top { gap: 10px; padding: 11px 14px; }
  .owner-status-access { width: 32px; height: 32px; }
  .chat-panel::before { opacity: .20; }
  .composer-wrap { border-radius: 17px; }
  .composer-controls { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .owner-status-access, .session-item, .send { transition: none; }
}

/* Both model and memory context route automatically, without visible selectors. */
#contextControl, #composerControls { display: none !important; }
