/*
 * Unified Nexora AI Workspace
 * Scoped to #nexora-workspace-root so the existing public pages and tool
 * routes retain their current implementation.
 */

body.nexora-workspace-active {
  overflow: hidden !important;
}

body.nexora-workspace-active > #root {
  display: none !important;
}

html.nexora-dashboard-route body > #root {
  display: none !important;
}

#nexora-workspace-root {
  --nw-bg: #0b0d10;
  --nw-surface: #111418;
  --nw-surface-raised: #171a20;
  --nw-border: #252a32;
  --nw-border-soft: rgba(201, 206, 214, 0.12);
  --nw-text: #f3f4f6;
  --nw-muted: #9ca3af;
  --nw-subtle: #6b7280;
  --nw-accent: #c9ced6;
  --nw-sidebar: 276px;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  grid-template-columns: var(--nw-sidebar) minmax(0, 1fr);
  overflow: hidden;
  background: var(--nw-bg);
  color: var(--nw-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#nexora-workspace-root *,
#nexora-workspace-root *::before,
#nexora-workspace-root *::after {
  box-sizing: border-box;
}

#nexora-workspace-root button,
#nexora-workspace-root input,
#nexora-workspace-root textarea {
  font: inherit;
}

#nexora-workspace-root button,
#nexora-workspace-root a {
  -webkit-tap-highlight-color: transparent;
}

.nw-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 12px 12px;
  background: #0e1013;
  border-right: 1px solid var(--nw-border);
}

.nw-brand-row,
.nw-header,
.nw-sidebar-footer,
.nw-composer-actions,
.nw-header-tool,
.nw-user-link {
  display: flex;
  align-items: center;
}

.nw-brand-row {
  min-height: 36px;
  justify-content: space-between;
  padding: 0 4px 4px;
}

.nw-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--nw-text);
  text-decoration: none;
}

.nw-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--nw-border);
}

.nw-brand span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nw-icon-button,
.nw-send,
.nw-stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  color: var(--nw-muted);
  background: transparent;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.nw-icon-button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.nw-icon-button:hover,
.nw-icon-button:focus-visible {
  color: var(--nw-text);
  background: var(--nw-surface-raised);
  border-color: var(--nw-border);
}

.nw-icon-button:focus-visible,
.nw-send:focus-visible,
.nw-stop:focus-visible,
.nw-tools-button:focus-visible,
.nw-new-chat:focus-visible,
.nw-history-item:focus-visible {
  outline: 2px solid var(--nw-accent);
  outline-offset: 2px;
}

.nw-new-chat {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--nw-border);
  border-radius: 10px;
  color: var(--nw-text);
  background: var(--nw-surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.nw-new-chat:hover {
  background: var(--nw-surface-raised);
  border-color: #3a414d;
}

.nw-search {
  position: relative;
  display: flex;
  align-items: center;
}

.nw-search svg {
  position: absolute;
  left: 12px;
  color: var(--nw-subtle);
  pointer-events: none;
}

.nw-search input {
  width: 100%;
  height: 36px;
  padding: 0 10px 0 34px;
  border: 1px solid var(--nw-border);
  border-radius: 9px;
  outline: none;
  color: var(--nw-text);
  background: #111317;
  font-size: 12px;
}

.nw-search input::placeholder {
  color: var(--nw-subtle);
}

.nw-search input:focus {
  border-color: #4a515d;
  box-shadow: 0 0 0 2px rgba(201, 206, 214, 0.08);
}

.nw-history {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 3px 0;
  scrollbar-width: thin;
  scrollbar-color: #2c323a transparent;
}

.nw-history-group {
  margin: 0 0 13px;
}

.nw-history-label {
  padding: 0 10px 6px;
  color: var(--nw-subtle);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nw-history-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--nw-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nw-history-item:hover {
  color: var(--nw-text);
  background: #15181d;
}

.nw-history-item.is-active {
  color: var(--nw-text);
  background: var(--nw-surface-raised);
  border-color: var(--nw-border);
}

.nw-history-item svg {
  flex: 0 0 auto;
  color: var(--nw-subtle);
}

.nw-history-title {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nw-history-more {
  display: none;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px;
  border: 0;
  color: var(--nw-subtle);
  background: transparent;
  cursor: pointer;
}

.nw-history-menu {
  position: absolute;
  z-index: 5;
  top: 34px;
  right: 7px;
  min-width: 126px;
  padding: 4px;
  border: 1px solid var(--nw-border);
  border-radius: 9px;
  background: #171a20;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.nw-history-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  color: var(--nw-muted);
  background: transparent;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.nw-history-menu button:hover,
.nw-history-menu button:focus-visible {
  color: var(--nw-text);
  background: #222731;
  outline: none;
}

.nw-history-menu button:last-child:hover,
.nw-history-menu button:last-child:focus-visible {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.28);
}

.nw-history-item:hover .nw-history-more,
.nw-history-item.is-active .nw-history-more {
  display: inline-flex;
}

@media (hover: none) {
  .nw-history-more {
    display: inline-flex;
  }
}

.nw-history-empty {
  padding: 16px 10px;
  color: var(--nw-subtle);
  font-size: 12px;
  line-height: 1.55;
}

.nw-sidebar-footer {
  min-height: 45px;
  padding: 8px 6px 2px;
  border-top: 1px solid var(--nw-border);
}

.nw-user-link {
  width: 100%;
  gap: 9px;
  padding: 5px 6px;
  border-radius: 8px;
  color: var(--nw-muted);
  text-decoration: none;
  font-size: 12px;
}

.nw-user-link:hover {
  color: var(--nw-text);
  background: var(--nw-surface);
}

.nw-user-link img {
  width: 23px;
  height: 23px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--nw-border);
}

.nw-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--nw-bg);
}

.nw-header {
  flex: 0 0 auto;
  min-height: 58px;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--nw-border);
  background: rgba(11, 13, 16, 0.92);
}

.nw-header-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nw-header-tool {
  min-width: 0;
  gap: 9px;
}

.nw-tool-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--nw-border);
  border-radius: 8px;
  color: var(--nw-accent);
  background: var(--nw-surface);
}

.nw-header-tool-copy {
  min-width: 0;
}

.nw-header-tool-title {
  overflow: hidden;
  color: var(--nw-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nw-header-tool-subtitle {
  margin-top: 2px;
  overflow: hidden;
  color: var(--nw-subtle);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nw-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nw-tools-header-wrap {
  position: relative;
}

.nw-tools-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--nw-border);
  border-radius: 8px;
  color: var(--nw-muted);
  background: var(--nw-surface);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.nw-tools-button:hover,
.nw-tools-button:focus-visible,
.nw-tools-button[aria-expanded="true"] {
  color: var(--nw-text);
  background: var(--nw-surface-raised);
  border-color: #3a414d;
}

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

.nw-mobile-menu {
  display: none;
}

.nw-conversation {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.nw-message-list {
  width: min(840px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 40px 24px 180px;
}

.nw-empty {
  min-height: min(58vh, 510px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nw-empty-mark {
  width: 50px;
  height: 50px;
  margin-bottom: 17px;
  padding: 5px;
  border: 1px solid var(--nw-border);
  border-radius: 15px;
  background: var(--nw-surface);
}

.nw-empty-mark img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.nw-empty h1 {
  margin: 0 0 8px;
  color: var(--nw-text);
  font-size: clamp(23px, 3vw, 31px);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.nw-empty p {
  max-width: 420px;
  margin: 0;
  color: var(--nw-muted);
  font-size: 13px;
  line-height: 1.6;
}

.nw-message {
  display: flex;
  gap: 13px;
  margin: 0 0 28px;
  animation: nw-message-in 160ms ease-out both;
}

.nw-message.user {
  flex-direction: row-reverse;
}

.nw-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  border: 1px solid var(--nw-border);
  border-radius: 8px;
  color: var(--nw-accent);
  background: var(--nw-surface);
  font-size: 11px;
  font-weight: 700;
}

.nw-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.nw-message-body {
  min-width: 0;
  max-width: min(720px, calc(100% - 42px));
}

.nw-message.user .nw-message-body {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.nw-message-role {
  margin: 0 0 5px;
  color: var(--nw-subtle);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nw-message-content {
  color: #d8dbe0;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.nw-message.user .nw-message-content {
  padding: 10px 13px;
  border: 1px solid #3d7bff;
  border-radius: 14px 14px 3px 14px;
  color: #ffffff;
  background: #245ee8;
  box-shadow: 0 5px 18px rgba(25, 83, 218, 0.18);
  line-height: 1.55;
}

.nw-message-content p {
  margin: 0 0 12px;
}

.nw-message-content p:last-child {
  margin-bottom: 0;
}

.nw-message-content h1,
.nw-message-content h2,
.nw-message-content h3 {
  margin: 18px 0 8px;
  color: var(--nw-text);
  font-size: 16px;
  letter-spacing: -0.025em;
}

.nw-message-content h1:first-child,
.nw-message-content h2:first-child,
.nw-message-content h3:first-child {
  margin-top: 0;
}

.nw-message-content ul,
.nw-message-content ol {
  margin: 8px 0 14px;
  padding-left: 22px;
}

.nw-message-content li {
  margin: 4px 0;
}

.nw-message-content strong {
  color: var(--nw-text);
  font-weight: 650;
}

.nw-message-content code {
  padding: 2px 5px;
  border: 1px solid var(--nw-border);
  border-radius: 5px;
  color: #e3e6ea;
  background: #0b0d10;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.nw-code-wrap {
  position: relative;
  margin: 12px 0 15px;
  overflow: hidden;
  border: 1px solid var(--nw-border);
  border-radius: 10px;
  background: #0b0d10;
}

.nw-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 31px;
  padding: 0 9px 0 12px;
  border-bottom: 1px solid var(--nw-border);
  color: var(--nw-subtle);
  background: #111418;
  font-size: 10px;
}

.nw-copy-code {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  color: var(--nw-muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.nw-copy-code:hover {
  color: var(--nw-text);
  background: var(--nw-surface-raised);
}

.nw-code-wrap pre {
  max-width: 100%;
  margin: 0;
  padding: 13px;
  overflow-x: auto;
  color: #d8dbe0;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}

.nw-message-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.nw-message:hover .nw-message-actions,
.nw-message:focus-within .nw-message-actions,
.nw-message.is-streaming .nw-message-actions {
  opacity: 1;
}

.nw-message-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  color: var(--nw-subtle);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.nw-message-actions button:hover {
  color: var(--nw-text);
  background: var(--nw-surface);
}

.nw-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

.nw-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--nw-muted);
  animation: nw-pulse 1s ease-in-out infinite;
}

.nw-typing span:nth-child(2) {
  animation-delay: 120ms;
}

.nw-typing span:nth-child(3) {
  animation-delay: 240ms;
}

.nw-error {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #493337;
  border-radius: 8px;
  color: #d8bfc2;
  background: #1d1417;
  font-size: 12px;
  line-height: 1.45;
}

.nw-composer-dock {
  position: absolute;
  right: 0;
  bottom: 0;
  left: var(--nw-sidebar);
  z-index: 20;
  padding: 20px 24px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(11, 13, 16, 0), #0b0d10 25%);
  pointer-events: none;
}

.nw-composer-container {
  width: min(840px, 100%);
  margin: 0 auto;
  pointer-events: auto;
}

.nw-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 8px;
}

.nw-attachment-image {
  position: relative;
  width: 82px;
  height: 66px;
  overflow: hidden;
  border: 1px solid var(--nw-border);
  border-radius: 9px;
  background: var(--nw-surface);
}

.nw-attachment-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nw-attachment-image::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 28px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  content: "";
  pointer-events: none;
}

.nw-attachment-image span {
  position: absolute;
  right: 5px;
  bottom: 4px;
  left: 5px;
  z-index: 1;
  overflow: hidden;
  color: #ffffff;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nw-attachment-image button {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(5, 7, 10, 0.68);
  cursor: pointer;
}

.nw-attachment-image button:hover {
  background: rgba(5, 7, 10, 0.9);
}

.nw-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 230px;
  min-height: 30px;
  padding: 4px 7px 4px 9px;
  border: 1px solid var(--nw-border);
  border-radius: 8px;
  color: var(--nw-muted);
  background: var(--nw-surface);
  font-size: 11px;
}

.nw-attachment-chip span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nw-attachment-chip button {
  display: inline-flex;
  padding: 2px;
  border: 0;
  color: var(--nw-subtle);
  background: transparent;
  cursor: pointer;
}

.nw-attachment-chip button:hover {
  color: var(--nw-text);
}

.nw-composer {
  border: 1px solid #303640;
  border-radius: 15px;
  background: #111418;
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.25);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.nw-composer:focus-within {
  border-color: #4a515d;
  box-shadow: 0 0 0 2px rgba(201, 206, 214, 0.06),
    0 13px 30px rgba(0, 0, 0, 0.25);
}

.nw-composer textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 180px;
  padding: 15px 15px 8px;
  border: 0;
  outline: 0;
  resize: none;
  overflow-y: auto;
  color: var(--nw-text);
  background: transparent;
  font-size: 14px;
  line-height: 1.45;
}

.nw-composer textarea::placeholder {
  color: var(--nw-subtle);
}

.nw-composer-actions {
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 8px;
}

.nw-composer-left,
.nw-composer-selectors {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nw-composer-left {
  flex-wrap: wrap;
}

.nw-attachment-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--nw-muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.nw-attachment-button:hover,
.nw-attachment-button:focus-visible {
  color: var(--nw-text);
  background: var(--nw-surface-raised);
  border-color: var(--nw-border);
}

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

.nw-attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--nw-muted);
  background: transparent;
  cursor: pointer;
}

.nw-attach:hover {
  color: var(--nw-text);
  background: var(--nw-surface-raised);
  border-color: var(--nw-border);
}

.nw-send,
.nw-stop {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #0b0d10;
  background: var(--nw-accent);
}

.nw-send:hover:not(:disabled),
.nw-stop:hover {
  background: #f3f4f6;
}

.nw-send:disabled {
  color: #6b7280;
  background: #2b3037;
  cursor: not-allowed;
}

.nw-stop {
  color: var(--nw-text);
  background: #343a43;
}

.nw-popover {
  position: absolute;
  z-index: 50;
  bottom: calc(100% + 9px);
  min-width: 270px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 7px;
  border: 1px solid var(--nw-border);
  border-radius: 12px;
  background: #171a20;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
}

.nw-tools-popover {
  top: calc(100% + 9px);
  right: 0;
  bottom: auto;
  left: auto;
}

.nw-popover-title {
  padding: 7px 9px 6px;
  color: var(--nw-subtle);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nw-tool-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--nw-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nw-tool-option:hover,
.nw-tool-option.is-selected {
  color: var(--nw-text);
  background: #20242b;
  border-color: var(--nw-border);
}

.nw-option-copy {
  min-width: 0;
}

.nw-option-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nw-option-desc {
  margin-top: 2px;
  overflow: hidden;
  color: var(--nw-subtle);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nw-check {
  margin-left: auto;
  color: var(--nw-accent);
}

.nw-backdrop {
  display: none;
}

.nw-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;
}

@keyframes nw-message-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nw-pulse {
  0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 860px) {
  #nexora-workspace-root {
    display: block;
  }

  .nw-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: min(286px, calc(100vw - 52px));
    transform: translateX(-102%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.35);
  }

  #nexora-workspace-root.is-sidebar-open .nw-sidebar {
    transform: translateX(0);
  }

  .nw-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  #nexora-workspace-root.is-sidebar-open .nw-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nw-main {
    width: 100%;
    height: 100dvh;
  }

  .nw-header {
    padding: 10px 13px;
  }

  .nw-mobile-menu {
    display: inline-flex;
  }

  .nw-header-actions .nw-new-desktop {
    display: none;
  }

  .nw-message-list {
    padding: 28px 15px 180px;
  }

  .nw-composer-dock {
    left: 0;
    padding: 12px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .nw-empty {
    min-height: 52vh;
  }
}

@media (max-width: 470px) {
  .nw-header-tool-subtitle {
    display: none;
  }

  .nw-header-tool-title {
    max-width: 170px;
  }

  .nw-composer-actions {
    align-items: flex-end;
  }

  .nw-composer-selectors {
    max-width: calc(100% - 42px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nw-composer-selectors::-webkit-scrollbar {
    display: none;
  }

  .nw-message {
    gap: 9px;
    margin-bottom: 23px;
  }

  .nw-message-body {
    max-width: calc(100% - 37px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #nexora-workspace-root *,
  #nexora-workspace-root *::before,
  #nexora-workspace-root *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}