:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f4f4f4;
  background: #000;
  --muted: #a8a8a8;
  --edge: #2b2b2b;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #d8fc82; outline-offset: 4px; }
.sidebar { position: fixed; z-index: 2; inset: 0 auto 0 0; width: 248px; padding: 14px 12px; background: #101010; border-right: 1px solid #242424; }
.sidebar:not([open]) { width: 58px; background: #000; border-color: transparent; }
.sidebar summary { display: grid; place-items: center; list-style: none; width: 34px; height: 34px; border-radius: 8px; color: var(--muted); }
.sidebar summary::-webkit-details-marker { display: none; }
.sidebar summary:hover, .chats button:hover, .home:hover { background: #202020; color: #fff; }
.panel-icon { width: 17px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.panel-icon::before { content: ""; position: absolute; inset: 0 auto 0 4px; border-left: 1.5px solid currentColor; }
.menu-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sidebar-content { display: flex; flex-direction: column; gap: 14px; padding-top: 19px; height: calc(100% - 34px); }
.new-chat, .chats button, .home { border: 0; background: transparent; color: inherit; text-align: left; border-radius: 8px; font-size: 14px; padding: 11px 10px; }
.new-chat { border: 1px solid var(--edge); display: flex; align-items: center; gap: 8px; }
.new-chat:hover { background: #202020; }
.new-chat span:first-child { font-size: 17px; line-height: 1; }
.chats { display: grid; gap: 3px; overflow: auto; }
.chats button { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; width: 100%; }
.chats button[aria-current="true"] { background: #222; }
.home { display: flex; align-items: center; gap: 8px; margin-top: auto; font-weight: 690; }
.home img, .welcome img { mix-blend-mode: screen; }
.home span { margin-left: auto; color: var(--muted); }
.top, .workspace { margin-left: 58px; }
body:has(.sidebar[open]) :is(.top, .workspace) { margin-left: 248px; }
.top { position: sticky; z-index: 1; top: 0; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(12px, 3vw, 33px); border-bottom: 1px solid #1a1a1a; background: #000; }
.product { font-size: 14px; font-weight: 670; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.top-actions select { background: #121212; border: 1px solid #282828; border-radius: 8px; color: #d4d4d4; padding: 7px 4px; font: inherit; font-size: 12px; }
.connection { display: flex; align-items: center; gap: 7px; padding: 8px 11px; white-space: nowrap; color: #d4d4d4; background: #121212; border: 1px solid #282828; border-radius: 999px; font-size: 12px; }
.connection:hover { background: #202020; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #848484; }
.connection[data-connected] .dot { background: #d8fc82; }
/* Texto com gradiente animado (port do Magic UI "Animated Gradient Text").
   Ajuste --speed (1 = padrão), --color-from e --color-to por elemento. */
.animated-gradient-text {
  --speed: 1;
  --color-from: #ffaa40;
  --color-to: #9c40ff;
  --bg-size: calc(var(--speed) * 300%);
  display: inline;
  background-image: linear-gradient(to right, var(--color-from), var(--color-to), var(--color-from));
  background-size: var(--bg-size) 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient 8s linear infinite;
}
@keyframes gradient { to { background-position: var(--bg-size, 300%) 0; } }
@media (prefers-reduced-motion: reduce) { .animated-gradient-text { animation: none; } }
.main { min-height: calc(100svh - 62px); display: flex; flex-direction: column; }
.conversation, .input-area { width: min(744px, calc(100% - 36px)); margin-inline: auto; }
.main:has(.welcome:not([hidden])) { justify-content: center; padding-block: 32px 13vh; }
.welcome { display: grid; justify-items: center; gap: 17px; margin-bottom: 27px; text-align: center; }
.welcome h1 { font-size: clamp(29px, 5vw, 47px); font-weight: 630; letter-spacing: -.05em; margin: 0; }
.messages { display: grid; gap: 28px; padding: 30px 0; }
.message { margin: 0; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.message.user { justify-self: end; max-width: 86%; background: #202020; padding: 10px 15px; border-radius: 18px; }
.message.assistant { padding: 0 6px; }
.input-area { position: sticky; bottom: 0; margin-top: auto; padding: 10px 0 18px; background: #000; }
.main:has(.welcome:not([hidden])) .input-area { position: static; margin-top: 0; }
.composer { display: flex; gap: 12px; align-items: end; padding: 9px; background: #171717; border: 1px solid #333; border-radius: 25px; }
.composer:focus-within { border-color: #737373; }
.composer textarea { min-width: 0; flex: 1; padding: 11px 9px; border: 0; color: inherit; background: transparent; outline: 0; resize: vertical; min-height: 43px; max-height: 180px; line-height: 1.4; }
.composer textarea::placeholder { color: var(--muted); }
.send, .verify { border: 0; background: #f4f4f4; color: #101010; }
.send { height: 38px; width: 38px; margin: 2px; border-radius: 50%; font-size: 21px; flex: none; }
button:disabled { opacity: .45; cursor: default; }
.prompt-status { color: var(--muted); padding: 0 9px; font-size: 13px; }
dialog { width: min(500px, calc(100% - 30px)); padding: 27px; color: inherit; background: #171717; border: 1px solid #393939; border-radius: 20px; }
dialog::backdrop { background: #000b; }
dialog h2 { margin: 0 35px 14px 0; letter-spacing: -.035em; }
dialog p { color: #bdbdbd; font-size: 14px; line-height: 1.55; }
.close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #292929; color: inherit; font-size: 21px; }
.setup-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 17px 0; font-size: 13px; }
.setup-actions a { text-decoration: underline; text-underline-offset: 3px; }
.verify { border-radius: 999px; padding: 10px 13px; font-weight: 650; }
.setup-help { color: #c6c6c6; font-size: 13px; border-top: 1px solid var(--edge); padding-top: 12px; }
.pairing-code, pre { background: #242424; padding: 9px; border-radius: 7px; }
pre { overflow: auto; }
@media (max-width: 760px) {
  body:has(.sidebar[open]) :is(.top, .workspace) { margin-left: 0; }
  .top { margin-left: 0; padding-left: 57px; }
  .workspace { margin-left: 0; }
  .sidebar:not([open]) { bottom: auto; background: transparent; }
  .sidebar[open] { box-shadow: 0 0 0 100vmax #0009; }
}
@media (max-width: 350px) {
  .product { font-size: 12px; }
  .connection { padding-inline: 7px; }
  .top-actions { gap: 4px; }
}

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 27%); }
.processing { background: #111; border-left: 1px solid var(--edge); padding: 25px clamp(14px, 2vw, 26px); }
.processing h2 { font-size: clamp(16px, 1.65vw, 23px); margin: 0 0 clamp(27px, 5vh, 54px); letter-spacing: -.025em; }
@media (max-width: 1020px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .processing { border-left: 0; border-top: 1px solid var(--edge); }
  .main { min-height: calc(78svh - 62px); }
}
