:root {
  --bg: #0b0d10;
  --panel: #0f131a;
  --panel-2: #11151b;
  --text: #e9eef4;
  --muted: #b9c6d6;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --border: #2a3441;
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --radius: 12px;
  --icon: 28px; /* plus/mic size */
  --send: 44px; /* send size */
  --composer-min-h: 56px;
  --composer-max-h: 40vh;
  --hover: rgba(255,255,255,.06);
  --app-bg: var(--bg);
  --composer-pad-y: 5px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.layout {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow-x: hidden;
}

.main {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  margin-left: 0;
  display: flex;
  flex-direction: column;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: linear-gradient(180deg, #0d1218 0%, #0b0f15 100%);
  border-right: 1px solid var(--border);
  padding: 16px;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layout.sidebar-open .sidebar {
  transform: translateX(0);
}

.sidebar__brand {
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 18px;
  padding: 8px 6px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar__nav {
  display: grid;
  gap: 8px;
}

.nav-btn {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.nav-btn:hover {
  filter: brightness(1.05);
}

.sidebar__spacer {
  flex: 1 1 auto;
}

.sidebar__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0e1621;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.sidebar__profile:hover {
  filter: brightness(1.05);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(17, 21, 27, 0.6);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.hamburger {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}
.hamburger:hover {
  filter: brightness(1.06);
}

.topbar__title {
  font-size: 18px;
  margin: 0;
}

.health {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

#chat {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 14px;
  min-height: 280px;
  max-height: calc(100vh - 130px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  padding-bottom: calc(var(--send) + 36px);
}

.message {
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.message.me {
  align-items: flex-end;
}
.message.ai {
  align-items: flex-start;
}

.bubble__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 6px;
}

.msg-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px;
}
.msg-actions button {
  background: #1e293b;
  color: #cfe3ff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.msg-actions button:hover {
  filter: brightness(1.1);
}

.message.ai .msg-actions {
  justify-content: flex-start;
}

.bubble {
  position: relative;
  border-radius: 12px;
  padding: 12px 12px 8px;
  line-height: 1.5;
  white-space: pre-wrap;
  border: 1px solid var(--border);
}
.bubble.me {
  background: #091e3a;
  align-self: flex-end;
}
.bubble.ai {
  background: #0e1a27;
}
.bubble.err {
  background: #3b0d0d;
  border-color: #5e1a1a;
  color: #ffd4d4;
}
.bubble .content :is(h1, h2, h3) {
  margin: 8px 0 6px;
}
.bubble .content p {
  margin: 8px 0;
}
.bubble .content ul {
  margin: 6px 0 6px 20px;
}

pre.code {
  background: #0b121b;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  overflow: auto;
}
pre.code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.bubble-actions {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  gap: 6px;
}
.bubble-actions button {
  padding: 4px 8px;
  font-size: 12px;
  background: #182230;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.bubble-actions button:hover {
  filter: brightness(1.08);
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 16px 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

textarea, input, select {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

button {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
button:hover {
  background: var(--accent-2);
}

#timing {
  font-size: 12px;
  color: var(--muted);
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 40;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 200;
}
.modal[hidden], .modal + .backdrop[hidden] {
  display: none !important;
}

.modal[hidden], .backdrop[hidden] {
  display: none !important;
}

.modal > * {
  width: min(820px, 100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #0f141c;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #0e1219;
}
.modal__header h2 {
  font-size: 16px;
  margin: 0;
}

.modal__close {
  background: #1a2432;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}
.modal__close:hover {
  filter: brightness(1.08);
}

.modal__content {
  padding: 14px;
  display: grid;
  gap: 12px;
}
.modal__content .row input, .modal__content .row select {
  flex: 1 1 160px;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #0e1219;
}

.composer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25) 30%, var(--app-bg) 65%);
}

.composer {
  position: relative;
  width: min(70%, 900px);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: var(--composer-pad-y) 12px;
  min-height: var(--composer-min-h);
}

#msg {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
  resize: none;
  max-height: var(--composer-max-h);
  min-height: calc(var(--composer-min-h) - var(--composer-pad-y) * 2);
  padding: 12px calc(var(--send) + 20px) 12px 12px;
}

.actions {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions--row {
  flex-direction: row;
}

.icon {
  width: var(--icon);
  height: var(--icon);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.icon:hover {
  background: var(--hover);
}

.send {
  margin-left: auto;
  width: var(--send);
  height: var(--send);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

pre.log {
  background: #0b0b0b;
  color: #e6e6e6;
  padding: 0.5rem 0.75rem;
  border-radius: 0.35rem;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.segment {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--segment-bg, #0f1218);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.segment--text {
  background: rgba(255, 255, 255, 0.02);
}
.segment--doc {
  background: rgba(255, 255, 255, 0.04);
}
.segment--code {
  background: rgba(15, 18, 24, 0.85);
}
.segment h1, .segment h2, .segment h3, .segment h4, .segment h5, .segment h6 {
  margin: 0 0 6px 0;
}
.segment pre.code {
  margin: 0;
  overflow: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.segment .copy-code {
  margin-top: 8px;
  align-self: flex-end;
  display: inline-block;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.sidebar__section {
  margin-bottom: 12px;
}

.sidebar__section-title {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.9;
  padding: 6px 6px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.chat-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  display: grid;
  gap: 6px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.chat-item.active {
  outline: 2px solid var(--accent);
}
.chat-item button.chat-open {
  flex: 1 1 auto;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  border: 0;
  cursor: pointer;
}
.chat-item button.chat-open:hover {
  filter: brightness(1.06);
}
.chat-item .chat-gear {
  width: 38px;
  height: 100%;
  display: grid;
  place-items: center;
  background: #131a25;
  border-left: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.chat-item .chat-gear:hover {
  filter: brightness(1.1);
}

button.danger {
  background: #7f1d1d;
}

button.danger:hover {
  background: #991b1b;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 1100px) {
  .layout.sidebar-open .main {
    margin-left: 260px;
  }
}
@media (max-width: 640px) {
  .row {
    gap: 6px;
  }
  .bubble-actions {
    position: static;
    margin-bottom: 6px;
  }
  .bubble {
    padding-top: 8px;
  }
}
@media (max-width: 434px) {
  .segment--text, .segment--doc {
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
  .bubble.ai, .bubble.me {
    max-width: 100%;
  }
}

/*# sourceMappingURL=trndll.css.map */
