 :root {
  color-scheme: dark;
  --bg: #06111b;
  --panel: rgba(8, 25, 38, .82);
  --line: rgba(51, 220, 244, .24);
  --cyan: #45eaff;
  --blue: #1687ff;
  --text: #dffaff;
  --muted: #7da4b2;
  --green: #55f5bd;
  --amber: #ffd27b;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
  overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #0a2434 0%, var(--bg) 65%);
  color: var(--text); font-family: Inter, sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.grid-bg {
  position: fixed; inset: 0; pointer-events: none; opacity: .22;
  background-image: linear-gradient(rgba(69,234,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69,234,255,.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse, black 15%, transparent 85%);
}
.shell { position: relative; z-index: 1; height: 100%; padding: 22px 30px 16px; display: flex; flex-direction: column; }
.topbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--cyan); color: var(--cyan); font: 25px Orbitron, sans-serif; box-shadow: 0 0 18px #45eaff25; }
.brand-name { font: 700 21px Orbitron, sans-serif; letter-spacing: 5px; }
.brand-sub { color: var(--muted); font-size: 8px; letter-spacing: 2px; margin-top: 3px; }
.top-right { display: flex; align-items: center; gap: 10px; color: var(--cyan); font: 10px Orbitron, sans-serif; letter-spacing: 1px; }
.status-led { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px currentColor; }
.status-led.online { background: var(--green); }
.divider { color: #416879; }
.dashboard { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(210px, .9fr) minmax(270px, 1.2fr) minmax(270px, 1fr); gap: 20px; align-items: center; padding: 20px 0; overflow-y: auto;
overscroll-behavior: contain;}
.side-panel { min-height: 0; height: min(610px, 88%); padding: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 15px 50px #0003, inset 0 0 28px #45eaff08; }
.section-label { color: var(--cyan); font: 10px Orbitron, sans-serif; letter-spacing: 2px; }
.data-card { margin-top: 16px; padding: 14px 13px; background: linear-gradient(110deg, #45eaff0d, transparent); border-left: 2px solid var(--cyan); }
.card-label { color: var(--muted); font-size: 9px; letter-spacing: 1.8px; }
.large-value { margin-top: 8px; font: 19px Orbitron, sans-serif; letter-spacing: 1px; overflow-wrap: anywhere; }
.large-value.compact { font-size: 14px; }
.small-value { margin-top: 5px; color: var(--muted); font-size: 10px; }
.secondary-button, .send-button, .quick-button { color: var(--cyan); background: #071923; border: 1px solid #45eaff65; padding: 11px 12px; font: 9px Orbitron, sans-serif; letter-spacing: 1px; transition: .2s; }
.secondary-button:hover, .send-button:hover, .quick-button:hover { background: #45eaff18; border-color: var(--cyan); }
.full-button { width: 100%; margin-top: 15px; }
.tiny-note { color: var(--muted); font-size: 9px; line-height: 1.5; }
.left-panel > .tiny-note { margin-top: 10px; }
.core-panel { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 450px; }
.core-wrap { width: min(260px, 60vw); aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid #45eaff85; border-radius: 50%; box-shadow: 0 0 18px #45eaff1c; }
.orbit-a { inset: 1%; border-top-color: transparent; animation: spin 17s linear infinite; }
.orbit-b { inset: 12%; border-bottom-color: transparent; animation: spin 12s linear infinite reverse; }
.orbit-c { inset: 23%; border-left-color: transparent; animation: spin 8s linear infinite; }
.core-glow { position: absolute; width: 44%; height: 44%; border-radius: 50%; background: #00c8ff2b; filter: blur(24px); }
.core { width: 38%; height: 38%; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #126b86, #06131f 72%); border: 1px solid #8bf4ff; box-shadow: 0 0 35px #00d9ff5c, inset 0 0 25px #00d9ff4d; font: 15px Orbitron, sans-serif; letter-spacing: 3px; }
.core-scan { position: absolute; width: 90%; height: 1px; background: linear-gradient(90deg, transparent, #a5faff, transparent); opacity: .6; animation: scan 4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan { 0%,100% { transform: translateY(-95px); opacity: 0; } 50% { transform: translateY(95px); opacity: .8; } }
.core-panel.listening .orbit { border-color: #55f5bd; box-shadow: 0 0 22px #55f5bd55; }
.core-panel.processing .orbit { animation-duration: 2s; border-color: var(--amber); }
.welcome { margin-top: 28px; font: 16px Orbitron, sans-serif; letter-spacing: 3px; text-align: center; }
.assistant-state { color: var(--muted); margin-top: 9px; font: 9px Orbitron, sans-serif; letter-spacing: 2px; text-align: center; }
.waveform { display: flex; height: 25px; gap: 4px; align-items: center; margin-top: 15px; opacity: .35; }
.waveform.active { opacity: 1; }
.waveform i { display: block; width: 3px; height: 5px; background: var(--cyan); animation: wave .65s ease-in-out infinite alternate; }
.waveform i:nth-child(2n) { animation-delay: .13s; } .waveform i:nth-child(3n) { animation-delay: .28s; }
@keyframes wave { to { height: 23px; } }
.quick-actions { display: flex; gap: 7px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.quick-button { padding: 9px 10px; font-size: 8px; }
.right-panel { display: flex; flex-direction: column; }
.chat-header { display: flex; justify-content: space-between; align-items: center; }
.text-button { border: 0; background: none; color: var(--muted); font: 9px Orbitron, sans-serif; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 15px 2px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: #286174 transparent; }
.message { max-width: 96%; padding: 11px 12px; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.message p { margin: 5px 0 0; white-space: pre-wrap; }
.aura-message { align-self: flex-start; background: #45eaff0c; border-left: 2px solid var(--cyan); }
.user-message { align-self: flex-end; background: #1687ff19; border-right: 2px solid var(--blue); }
.message-tag { color: var(--cyan); font: 8px Orbitron, sans-serif; letter-spacing: 1.5px; }
.user-message .message-tag { color: #78baff; }
.composer { display: flex; gap: 6px; }
.composer input { min-width: 0; flex: 1; padding: 11px; border: 1px solid var(--line); background: #04111a; color: var(--text); outline: none; font-size: 11px; }
.composer input:focus { border-color: var(--cyan); }
.send-button { padding-inline: 13px; }
.chat-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.chat-controls .tiny-note { text-align: right; }
.footer { min-height: 24px; border-top: 1px solid var(--line); padding-top: 11px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: 8px Orbitron, sans-serif; letter-spacing: 1px; }
#cameraVideo { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 850px) {
  body { overflow: auto; }
  .shell { min-height: 100%; height: auto; padding: 14px; }
  .dashboard { grid-template-columns: 1fr; }
  .side-panel { height: auto; min-height: 260px; }
  .right-panel { min-height: 420px; }
  .core-panel { min-height: 370px; order: -1; }
  .left-panel { order: 0; }
  .right-panel { order: 1; }
  .footer { flex-wrap: wrap; }
}
@media (max-height: 650px) and (min-width: 851px) {
  .shell { padding-top: 10px; padding-bottom: 8px; }
  .dashboard { padding: 10px 0; gap: 12px; }
  .side-panel { height: 95%; padding: 12px; }
  .data-card { margin-top: 9px; padding: 9px; }
  .core-wrap { width: 200px; }
  .core-panel { min-height: 350px; }
}
