:root {
  --bg: #070b16;
  --panel: #0d1427;
  --panel-strong: #111b34;
  --panel-soft: #15213b;
  --border: #273756;
  --border-soft: rgba(126, 161, 255, .2);
  --ink: #f7f9ff;
  --muted: #9cabca;
  --dim: #6f7f9f;
  --primary: #5a82ff;
  --primary-hover: #7194ff;
  --cyan: #4dd4ff;
  --gold: #f3b85a;
  --ok: #6ad987;
  --danger: #ffb8b1;
  --danger-bg: #351c22;
  --radius: 8px;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -15%, rgba(77, 212, 255, .16), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #070b16 44%, #0b1020 100%);
  font-family: var(--sans);
}

button, input, textarea, select { font: inherit; }
button {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 13px;
  color: var(--ink);
  background: var(--panel-soft);
  cursor: pointer;
}
button:hover { border-color: #4c638d; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #3e6df2);
  color: white;
  box-shadow: 0 10px 28px rgba(79, 124, 255, .22);
}
button.primary:hover { background: linear-gradient(135deg, var(--primary-hover), #4f7cff); }
button.ghost { background: transparent; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 13px;
  outline: none;
  color: var(--ink);
  background: #0a1122;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(90, 130, 255, .18);
}

h1, h2, h3, p { margin: 0; }
.eyebrow {
  color: #9fb7ff;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.lede, .helper, .subtle { color: var(--muted); line-height: 1.55; }
.auth-dummy {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  background: var(--bg);
  color: var(--muted);
}
.mini-mark,
.cloudia-logo {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(77, 212, 255, .58);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 42%, rgba(77, 212, 255, .8) 42% 48%, transparent 48%),
    linear-gradient(0deg, transparent 42%, rgba(243, 184, 90, .88) 42% 48%, transparent 48%),
    rgba(77, 212, 255, .08);
  box-shadow: 0 0 24px rgba(77, 212, 255, .22);
}
.cloudia-logo.large { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-row { display: flex; align-items: center; gap: 10px; }

.login-shell {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}
.login-card {
  width: min(100%, 480px);
  padding: 30px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(13, 20, 39, .9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .38);
  backdrop-filter: blur(14px);
}
.login-card h1 { margin: 14px 0 12px; font-size: 2.55rem; }
.stack-form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.stack-form label { display: flex; flex-direction: column; gap: 7px; }
.stack-form .primary { width: 100%; min-height: 46px; }
.login-card .helper { margin-top: 14px; }
.error-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #783943;
  border-radius: var(--radius);
  color: var(--danger);
  background: var(--danger-bg);
}

.app-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  background: rgba(7, 11, 22, .94);
}
.sidebar {
  min-height: 0;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: rgba(9, 15, 29, .96);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand-block {
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(77, 212, 255, .08), rgba(90, 130, 255, .04));
  display: flex;
  gap: 12px;
}
.brand-block h1 { margin: 4px 0 2px; font-size: 1.55rem; }
.brand-block .subtle { font-size: .86rem; }
.new-chat-button { width: 100%; min-height: 42px; text-align: center; }
.sidebar-section { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.sidebar-section h2 { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.conversations-section { flex: 1; }
.section-header,
.topbar,
.topbar-actions,
.composer-row,
.stage-header,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-header, .topbar, .composer-row, .stage-header { justify-content: space-between; }
.tiny-button { padding: 6px 9px; font-size: .8rem; }

.session-list {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.session-item {
  width: 100%;
  min-width: 0;
  padding: 11px;
  border-color: transparent;
  background: transparent;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.session-item:hover { background: var(--panel); }
.session-item.active {
  border-color: var(--border);
  background: var(--panel-soft);
}
.session-title {
  overflow: hidden;
  font-size: .92rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-item .subtle {
  overflow: hidden;
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slim-section { margin-top: auto; }
.account-card { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.account-card strong, .account-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card span { font-size: .78rem; }
.account-card .tiny-button { margin-top: 6px; text-align: left; }

.main-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.topbar {
  min-height: 76px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 22, .88);
}
.topbar-title { min-width: 0; }
.topbar-title h1 {
  overflow: hidden;
  margin-top: 2px;
  font-size: 1.28rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-title .subtle { margin-top: 3px; font-size: .8rem; }
.topbar-actions { flex-shrink: 0; }
.model-select { width: 230px; padding: 9px 10px; }

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 34vw);
}
.chat-view {
  min-height: 0;
  overflow-y: auto;
  padding: 30px max(24px, calc((100% - 900px) / 2));
}
.message-stream {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.welcome-card {
  width: min(100%, 720px);
  margin: auto;
  padding: 28px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(13, 20, 39, .66);
}
.welcome-card h2 { margin: 7px 0 9px; font-size: 2rem; }
.welcome-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.welcome-item {
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(10, 17, 34, .72);
}
.welcome-item p { margin-top: 6px; font-size: .84rem; }

.bubble {
  width: min(100%, 780px);
  line-height: 1.65;
}
.bubble.user {
  width: auto;
  max-width: min(78%, 680px);
  align-self: flex-end;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
}
.bubble.assistant {
  align-self: flex-start;
  padding: 0 2px;
}
.bubble-head {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.bubble-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-content a { color: #9db9ff; }
.pending-bubble { min-height: 42px; }
.thinking-indicator {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.thinking-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  animation: thinking-pulse 1.1s ease-in-out infinite;
}
.thinking-indicator span:nth-child(2) { animation-delay: .16s; }
.thinking-indicator span:nth-child(3) { animation-delay: .32s; }
@keyframes thinking-pulse {
  0%, 70%, 100% { opacity: .35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

.neural-stage {
  min-width: 0;
  min-height: 0;
  padding: 22px 22px 22px 0;
  overflow: hidden;
}
.stage-card {
  position: relative;
  min-height: 100%;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 46%, rgba(243, 184, 90, .16), transparent 33%),
    linear-gradient(180deg, rgba(77, 212, 255, .08), rgba(7, 11, 22, .2)),
    rgba(13, 20, 39, .72);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brain-visual.monitor-hologram {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
  filter: drop-shadow(0 0 26px rgba(77, 212, 255, .16));
}
.monitor-hologram > * {
  position: absolute;
  pointer-events: none;
}
.halo {
  inset: 11%;
  border-radius: 50%;
  border: 1px solid rgba(77, 212, 255, .44);
  box-shadow: inset 0 0 34px rgba(77, 212, 255, .08), 0 0 30px rgba(77, 212, 255, .08);
}
.halo-one {
  transform: rotateX(66deg) rotateZ(-12deg);
  animation: monitor-orbit-a 22s linear infinite;
}
.halo-two {
  inset: 19%;
  border-color: rgba(243, 184, 90, .54);
  border-style: dashed;
  transform: rotateX(68deg) rotateZ(24deg);
  animation: monitor-orbit-b 16s linear infinite reverse;
}
.halo-three {
  inset: 27%;
  border-color: rgba(77, 212, 255, .32);
  transform: rotateY(64deg) rotateZ(18deg);
  animation: monitor-orbit-c 26s linear infinite;
}
.energy-shell {
  inset: 28%;
  border-radius: 50%;
  border: 1px solid rgba(255, 229, 178, .74);
  background:
    radial-gradient(circle at 48% 48%, rgba(255, 222, 160, .16), transparent 36%),
    linear-gradient(90deg, transparent 0 28%, rgba(255, 229, 178, .22) 31%, transparent 34% 66%, rgba(255, 229, 178, .18) 69%, transparent 72%),
    rgba(12, 19, 36, .28);
  box-shadow:
    0 0 34px rgba(243, 184, 90, .22),
    inset 0 0 28px rgba(77, 212, 255, .16);
  animation: shell-breathe 4.8s ease-in-out infinite;
}
.energy-core {
  width: 88px;
  height: 18px;
  border: 1px solid rgba(255, 229, 178, .82);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 229, 178, .12), rgba(255, 229, 178, .38), rgba(255, 229, 178, .12));
  box-shadow:
    0 0 26px rgba(243, 184, 90, .5),
    inset 0 0 18px rgba(77, 212, 255, .16);
  animation: core-signal 2.4s ease-in-out infinite;
}
.thinking .energy-core,
.voice-active .energy-core {
  animation-duration: .72s;
}
.thinking .energy-shell,
.voice-active .energy-shell {
  animation-duration: 1.4s;
}
.light-trails {
  inset: 10%;
  animation: trails-drift 18s linear infinite;
}
.light-trails span {
  position: absolute;
  left: 8%;
  top: 48%;
  width: 84%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 229, 178, .92), transparent);
  transform-origin: center;
  opacity: .72;
  box-shadow: 0 0 18px rgba(243, 184, 90, .32);
  animation: trail-pulse 3.8s ease-in-out infinite;
}
.light-trails span:nth-child(1) { transform: rotate(-11deg) translateY(-34px) scaleX(.78); }
.light-trails span:nth-child(2) { transform: rotate(8deg) translateY(-15px) scaleX(.96); animation-delay: .35s; }
.light-trails span:nth-child(3) { transform: rotate(-4deg) translateY(8px) scaleX(.86); animation-delay: .7s; }
.light-trails span:nth-child(4) { transform: rotate(15deg) translateY(30px) scaleX(.72); animation-delay: 1.05s; }
.light-trails span:nth-child(5) { transform: rotate(168deg) translateY(52px) scaleX(.58); animation-delay: 1.4s; }
.axis {
  background: linear-gradient(180deg, transparent, rgba(77, 212, 255, .58), transparent);
  opacity: .55;
}
.axis-vertical {
  width: 1px;
  height: 74%;
}
.axis-diagonal {
  width: 1px;
  height: 78%;
  transform: rotate(68deg);
}
.holo-shadow {
  bottom: 8%;
  width: 64%;
  height: 13%;
  border: 1px solid rgba(77, 212, 255, .18);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(77, 212, 255, .22), transparent 67%);
  transform: perspective(360px) rotateX(67deg);
  filter: blur(.2px);
}
@keyframes monitor-orbit-a {
  to { transform: rotateX(66deg) rotateZ(348deg); }
}
@keyframes monitor-orbit-b {
  to { transform: rotateX(68deg) rotateZ(384deg); }
}
@keyframes monitor-orbit-c {
  to { transform: rotateY(64deg) rotateZ(378deg); }
}
@keyframes shell-breathe {
  0%, 100% { transform: scale(.96); opacity: .76; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes core-signal {
  0%, 100% { transform: scaleX(.78); opacity: .76; }
  50% { transform: scaleX(1.18); opacity: 1; }
}
@keyframes trails-drift {
  to { transform: rotate(360deg); }
}
@keyframes trail-pulse {
  0%, 100% { opacity: .28; }
  50% { opacity: .86; }
}

.composer-panel {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 22, .94);
}
.composer-form {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.composer-input {
  min-height: 58px;
  max-height: 180px;
  padding: 8px;
  border: 0;
  resize: none;
  background: transparent;
  box-shadow: none !important;
}
.composer-row { align-items: end; }
.composer-left { min-width: 0; flex: 1; }
.composer-left .subtle { font-size: .78rem; }
.icon-button { min-width: 48px; }
.voice-toggle {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.voice-glyph {
  position: relative;
  width: 16px;
  height: 23px;
  border: 2px solid currentColor;
  border-radius: 999px;
  display: block;
}
.voice-glyph::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 22px;
  height: 14px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
  opacity: .82;
}
.voice-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 2px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}
.icon-button.active {
  border-color: rgba(243, 184, 90, .55);
  color: #fff2d2;
  background: rgba(243, 184, 90, .12);
}
.voice-toggle.limited {
  opacity: 1;
  cursor: pointer;
  color: #c6d5f8;
  border-color: rgba(120, 150, 210, .35);
}
.voice-toggle.limited .voice-glyph {
  opacity: .82;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(3, 7, 18, .78);
}
.modal-panel {
  width: min(100%, 760px);
  max-height: min(86vh, 760px);
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.modal-header h2 { margin-top: 5px; }
.user-create-form {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr auto;
  gap: 8px;
}
.users-list { display: flex; flex-direction: column; gap: 8px; }
.user-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: var(--panel-soft);
}
.user-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.user-row-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-actions { display: flex; gap: 6px; }
.button-link {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 1080px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .neural-stage { display: none; }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .sidebar {
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }
  .brand-block {
    padding: 8px;
    border: 0;
    background: transparent;
  }
  .brand-block .cloudia-logo,
  .brand-block .eyebrow,
  .brand-block .subtle,
  .sidebar-section h2,
  .account-card,
  .model-select {
    display: none;
  }
  .brand-block h1 { margin: 0; font-size: 1rem; }
  .new-chat-button { width: auto; min-height: 36px; padding: 8px 10px; }
  .conversations-section { min-width: 0; }
  .session-list { flex-direction: row; overflow-x: auto; }
  .session-item { width: auto; min-width: 130px; max-width: 180px; padding: 8px 10px; }
  .slim-section { display: none; }
  .section-header { display: block; }
  .topbar { min-height: 58px; padding: 9px 12px; }
  .topbar-title .subtle, .topbar-title .eyebrow { display: none; }
  .chat-view, .composer-panel { padding-left: 12px; padding-right: 12px; }
  .bubble.user { max-width: 88%; }
  .welcome-grid { grid-template-columns: 1fr; }
  .user-create-form { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: 1fr; }
}

/* Premium shell 2026-06-14: conversa limpa + palco holografico */
body {
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 198, 107, .12), transparent 30%),
    radial-gradient(circle at 32% 6%, rgba(77, 212, 255, .18), transparent 28%),
    linear-gradient(145deg, #050814 0%, #07101e 52%, #020713 100%);
}

.app-shell {
  grid-template-columns: 310px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(90, 130, 255, .07), transparent 28%),
    rgba(2, 7, 19, .96);
}

.sidebar {
  padding: 18px 14px;
  border-right-color: rgba(126, 161, 255, .18);
  background:
    linear-gradient(180deg, rgba(15, 28, 54, .9), rgba(4, 9, 21, .96)),
    rgba(4, 9, 21, .96);
}

.brand-block,
.login-card {
  border-color: rgba(126, 161, 255, .26);
  background:
    radial-gradient(circle at 0% 0%, rgba(77, 212, 255, .14), transparent 38%),
    linear-gradient(180deg, rgba(18, 30, 58, .96), rgba(9, 15, 31, .92));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .32);
}

.cloudia-logo,
.mini-mark {
  border-radius: 11px;
  background:
    linear-gradient(90deg, transparent 43%, rgba(84, 220, 255, .82) 43% 48%, transparent 48%),
    linear-gradient(0deg, transparent 43%, rgba(255, 202, 106, .88) 43% 48%, transparent 48%),
    radial-gradient(circle at 50% 50%, rgba(90, 130, 255, .2), transparent 62%),
    rgba(13, 20, 39, .96);
}

.topbar {
  min-height: 82px;
  padding: 17px 28px;
  border-bottom-color: rgba(126, 161, 255, .18);
  background:
    linear-gradient(180deg, rgba(6, 12, 28, .97), rgba(4, 9, 20, .88));
}

.topbar-title h1 {
  font-size: 1.5rem;
}

.topbar-actions {
  opacity: .92;
}

.workspace {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 38vw);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .014) 1px, transparent 1px);
  background-size: 64px 64px;
}

.chat-view {
  padding: 42px max(38px, calc((100% - 900px) / 2));
}

.message-stream {
  gap: 24px;
}

.welcome-card,
.bubble.user {
  border-color: rgba(126, 161, 255, .22);
  background:
    linear-gradient(180deg, rgba(18, 30, 58, .84), rgba(9, 15, 31, .72));
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
}

.bubble.assistant {
  max-width: min(100%, 820px);
  padding: 18px 20px;
  border: 1px solid rgba(126, 161, 255, .14);
  border-radius: 14px;
  background: rgba(6, 12, 28, .46);
}

.bubble-content {
  font-size: 1rem;
}

.neural-stage {
  padding: 24px 28px 24px 0;
}

.stage-card {
  min-height: 100%;
  border-color: rgba(126, 161, 255, .24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 49%, rgba(255, 214, 144, .2), transparent 27%),
    radial-gradient(circle at 50% 86%, rgba(77, 212, 255, .23), transparent 18%),
    linear-gradient(180deg, rgba(14, 27, 47, .96), rgba(4, 9, 20, .96));
  box-shadow:
    inset 0 0 90px rgba(77, 212, 255, .08),
    0 30px 80px rgba(0, 0, 0, .35);
}

.stage-card::before,
.stage-card::after {
  content: "";
  position: absolute;
  inset: 8%;
  pointer-events: none;
  border-radius: 50%;
}

.stage-card::before {
  border: 1px solid rgba(77, 212, 255, .13);
  transform: perspective(640px) rotateX(64deg);
  filter: blur(.2px);
}

.stage-card::after {
  inset: auto 12% 8%;
  height: 18%;
  border: 1px solid rgba(77, 212, 255, .18);
  background: radial-gradient(ellipse at center, rgba(77, 212, 255, .18), transparent 68%);
  transform: perspective(420px) rotateX(68deg);
}

.brain-visual.monitor-hologram {
  width: min(92%, 620px);
  filter:
    drop-shadow(0 0 26px rgba(77, 212, 255, .22))
    drop-shadow(0 0 46px rgba(243, 184, 90, .12));
}

.halo-one {
  border-color: rgba(77, 212, 255, .5);
}

.halo-two {
  border-color: rgba(255, 221, 163, .62);
}

.energy-shell {
  border-color: rgba(255, 231, 184, .92);
  box-shadow:
    0 0 44px rgba(255, 196, 95, .28),
    inset 0 0 40px rgba(77, 212, 255, .19);
}

.energy-core {
  width: 106px;
  height: 22px;
  background: linear-gradient(90deg, rgba(255, 229, 178, .12), rgba(255, 229, 178, .76), rgba(255, 229, 178, .12));
}

.composer-panel {
  padding: 16px 28px 22px;
  border-top-color: rgba(126, 161, 255, .18);
  background: rgba(4, 9, 20, .96);
}

.composer-form {
  border-color: rgba(126, 161, 255, .26);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(18, 30, 58, .76), rgba(9, 15, 31, .88));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}

.composer-input {
  min-height: 66px;
  font-size: 1rem;
}

.model-select {
  border-color: rgba(126, 161, 255, .25);
  border-radius: 12px;
  background: rgba(9, 15, 31, .86);
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Millenium Premium Layout - 2026-06-15
   Camada final para a experiencia publica: chat limpo + monitor holografico. */
:root {
  --bg: #030814;
  --panel: rgba(8, 15, 32, .86);
  --panel-strong: rgba(12, 23, 45, .94);
  --panel-soft: rgba(24, 38, 70, .78);
  --border: rgba(105, 144, 214, .24);
  --border-soft: rgba(105, 144, 214, .18);
  --ink: #f8fbff;
  --muted: #9fb0d2;
  --primary: #5f86ff;
  --cyan: #42d6ff;
  --gold: #f6c16b;
}

html,
body {
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 74% 28%, rgba(246, 193, 107, .11), transparent 28%),
    radial-gradient(circle at 28% 0%, rgba(66, 214, 255, .16), transparent 26%),
    linear-gradient(145deg, #020612 0%, #06101e 52%, #030815 100%);
}

.app-shell {
  grid-template-columns: 300px minmax(0, 1fr);
  background: rgba(2, 6, 18, .98);
}

.sidebar {
  padding: 18px 14px;
  border-right-color: rgba(105, 144, 214, .18);
  background:
    radial-gradient(circle at 34% 0%, rgba(66, 214, 255, .09), transparent 30%),
    linear-gradient(180deg, rgba(10, 18, 36, .98), rgba(3, 8, 20, .98));
}

.brand-block {
  min-height: 138px;
  padding: 18px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(66, 214, 255, .18), transparent 38%),
    linear-gradient(180deg, rgba(18, 31, 58, .96), rgba(7, 13, 29, .96));
}

.brand-block h1 {
  font-size: 1.95rem;
}

.new-chat-button {
  min-height: 52px;
  border-radius: 14px;
  font-size: 1.02rem;
  font-weight: 700;
}

.session-list {
  gap: 10px;
  padding-right: 4px;
}

.session-item {
  min-height: 82px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.session-item.active {
  border-color: rgba(126, 161, 255, .32);
  background:
    linear-gradient(180deg, rgba(35, 55, 98, .78), rgba(18, 30, 58, .72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.main-panel {
  grid-template-rows: 96px minmax(0, 1fr) auto;
}

.topbar {
  min-height: 96px;
  padding: 20px 34px;
  border-bottom-color: rgba(105, 144, 214, .2);
  background:
    linear-gradient(180deg, rgba(4, 9, 22, .98), rgba(3, 8, 19, .92));
}

.topbar-title h1 {
  font-size: clamp(1.45rem, 2vw, 2.05rem);
}

.topbar-title .subtle {
  color: #8ea2c8;
}

.model-select {
  width: 260px;
  min-height: 48px;
  border-radius: 14px;
  border-color: rgba(126, 161, 255, .28);
  background: rgba(8, 15, 32, .92);
  font-weight: 700;
}

.workspace {
  grid-template-columns: minmax(500px, 56%) minmax(430px, 44%);
  background:
    linear-gradient(90deg, rgba(126, 161, 255, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(126, 161, 255, .035) 1px, transparent 1px);
  background-size: 72px 72px;
}

.chat-view {
  padding: 38px max(38px, calc((100% - 900px) / 2)) 30px;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 161, 255, .32) transparent;
}

.chat-view::-webkit-scrollbar,
.session-list::-webkit-scrollbar {
  width: 8px;
}

.chat-view::-webkit-scrollbar-thumb,
.session-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(126, 161, 255, .28);
}

.message-stream {
  justify-content: flex-start;
  gap: 22px;
}

.welcome-card,
.bubble.assistant,
.bubble.user {
  border-radius: 18px;
}

.welcome-card {
  margin: 0 auto;
  border-color: rgba(126, 161, 255, .2);
  background: rgba(8, 15, 32, .66);
}

.bubble {
  font-size: 1.03rem;
}

.bubble.user {
  max-width: min(72%, 640px);
  padding: 14px 17px;
  border-color: rgba(126, 161, 255, .3);
  background:
    linear-gradient(180deg, rgba(38, 58, 102, .86), rgba(18, 30, 58, .82));
}

.bubble.assistant {
  max-width: min(96%, 850px);
  padding: 18px 21px;
  border-color: rgba(126, 161, 255, .17);
  background:
    linear-gradient(180deg, rgba(8, 15, 32, .7), rgba(5, 10, 24, .52));
  box-shadow: 0 20px 70px rgba(0, 0, 0, .18);
}

.bubble-head {
  color: #9db5ff;
}

.bubble-content {
  line-height: 1.75;
}

.bubble-content a {
  color: #a9c1ff;
  font-weight: 700;
}

.neural-stage {
  padding: 28px 34px 28px 0;
}

.stage-card {
  min-height: 100%;
  border-radius: 18px;
  border-color: rgba(126, 161, 255, .22);
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 220, 166, .25), transparent 22%),
    radial-gradient(circle at 50% 78%, rgba(66, 214, 255, .25), transparent 18%),
    linear-gradient(180deg, rgba(15, 30, 53, .96), rgba(4, 9, 21, .97));
  box-shadow:
    inset 0 0 120px rgba(66, 214, 255, .1),
    inset 0 -80px 120px rgba(2, 6, 18, .68),
    0 32px 90px rgba(0, 0, 0, .38);
}

.stage-card::before {
  inset: 11%;
  border-color: rgba(66, 214, 255, .16);
  box-shadow: 0 0 55px rgba(66, 214, 255, .06);
}

.brain-visual.monitor-hologram {
  width: min(94%, 720px);
  filter:
    drop-shadow(0 0 30px rgba(66, 214, 255, .22))
    drop-shadow(0 0 58px rgba(246, 193, 107, .18));
}

.brain-visual.monitor-hologram::before,
.brain-visual.monitor-hologram::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.brain-visual.monitor-hologram::before {
  inset: 18%;
  border: 1px solid rgba(255, 230, 190, .38);
  background:
    repeating-linear-gradient(92deg, rgba(255, 230, 190, .11) 0 1px, transparent 1px 16px),
    radial-gradient(circle at 52% 50%, rgba(255, 230, 190, .18), transparent 58%);
  box-shadow:
    inset 0 0 38px rgba(66, 214, 255, .12),
    0 0 44px rgba(246, 193, 107, .17);
  transform: perspective(760px) rotateX(6deg);
  animation: premium-core-breathe 5.4s ease-in-out infinite;
}

.brain-visual.monitor-hologram::after {
  left: 25%;
  right: 25%;
  top: 47%;
  height: 7%;
  border: 1px solid rgba(255, 230, 190, .9);
  background:
    linear-gradient(90deg, rgba(255, 230, 190, .08), rgba(255, 230, 190, .66), rgba(255, 230, 190, .08));
  box-shadow:
    0 0 26px rgba(246, 193, 107, .56),
    inset 0 0 18px rgba(66, 214, 255, .12);
  animation: premium-signal 2.8s ease-in-out infinite;
}

.halo {
  border-width: 1px;
  opacity: .95;
}

.halo-one {
  inset: 6%;
  border-color: rgba(66, 214, 255, .43);
}

.halo-two {
  inset: 16%;
  border-color: rgba(246, 193, 107, .52);
}

.halo-three {
  inset: 24%;
  border-color: rgba(66, 214, 255, .28);
}

.energy-shell,
.energy-core {
  display: none;
}

.axis {
  opacity: .32;
  background: linear-gradient(180deg, transparent, rgba(66, 214, 255, .52), transparent);
}

.axis-diagonal {
  opacity: .4;
  transform: rotate(72deg);
}

.light-trails {
  inset: 9%;
  animation: trails-drift 26s linear infinite;
}

.light-trails span {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 234, 198, .98), transparent);
  box-shadow: 0 0 24px rgba(246, 193, 107, .44);
}

.light-trails span:nth-child(1) { transform: rotate(-15deg) translateY(-58px) scaleX(.82); }
.light-trails span:nth-child(2) { transform: rotate(8deg) translateY(-26px) scaleX(1.02); }
.light-trails span:nth-child(3) { transform: rotate(-3deg) translateY(2px) scaleX(.9); }
.light-trails span:nth-child(4) { transform: rotate(16deg) translateY(38px) scaleX(.76); }
.light-trails span:nth-child(5) { transform: rotate(171deg) translateY(70px) scaleX(.68); }

.holo-shadow {
  bottom: 7%;
  width: 72%;
  height: 16%;
  opacity: .92;
  border-color: rgba(66, 214, 255, .2);
  background: radial-gradient(ellipse at center, rgba(66, 214, 255, .25), transparent 66%);
}

.brain-visual.monitor-hologram.thinking::after,
.brain-visual.monitor-hologram.voice-active::after {
  animation-duration: .72s;
}

.brain-visual.monitor-hologram.thinking .light-trails,
.brain-visual.monitor-hologram.voice-active .light-trails {
  animation-duration: 10s;
}

.brain-visual.monitor-hologram.listening {
  filter:
    drop-shadow(0 0 38px rgba(66, 214, 255, .34))
    drop-shadow(0 0 68px rgba(66, 214, 255, .2));
}

.brain-visual.monitor-hologram.listening .halo-one {
  border-color: rgba(66, 214, 255, .78);
  animation-duration: 8s;
}

.brain-visual.monitor-hologram.speaking .halo-two,
.brain-visual.monitor-hologram.speaking .halo-three {
  border-color: rgba(255, 231, 184, .72);
  animation-duration: 7s;
}

.brain-visual.monitor-hologram.speaking .light-trails {
  animation-duration: 6s;
}

.brain-visual.monitor-hologram.speaking::after {
  animation-duration: .58s;
}

@keyframes premium-core-breathe {
  0%, 100% { transform: perspective(760px) rotateX(6deg) scale(.96); opacity: .82; }
  50% { transform: perspective(760px) rotateX(6deg) scale(1.035); opacity: 1; }
}

@keyframes premium-signal {
  0%, 100% { transform: scaleX(.78); opacity: .72; }
  50% { transform: scaleX(1.16); opacity: 1; }
}

.composer-panel {
  padding: 16px 34px 24px;
  border-top-color: rgba(105, 144, 214, .2);
}

.composer-form {
  border-radius: 18px;
  border-color: rgba(126, 161, 255, .28);
}

.composer-input {
  min-height: 70px;
  font-size: 1.02rem;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 40vw);
  }

  .brain-visual.monitor-hologram {
    width: min(96%, 560px);
  }
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .neural-stage {
    display: none;
  }
}
