.app {
  grid-template-columns: 288px minmax(0, 1fr) 300px !important;
}

body.nav-normal-sidebar .app,
.app.nav-normal-sidebar {
  grid-template-columns: 288px minmax(0, 1fr) 300px !important;
}

.s214-sidebar {
  width: 288px;
  min-width: 288px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #202123;
  color: #f4f4f5;
  padding: 10px;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  position: relative;
}

.s214-top,
.s214-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.s214-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 10px;
  scrollbar-width: thin;
}

.s214-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.s214-sidebar-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 2px 2px;
}

.s214-sidebar-toggle {
  width: 34px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b7b8bf;
  cursor: pointer;
}

.s214-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #f4f4f5;
}

.s243-search-field {
  min-width: 0;
  height: 32px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #b7b8bf;
  cursor: text;
}

.s243-search-field:hover,
.s243-search-field:focus-within {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
}

.s243-search-field .s214-icon {
  width: 16px;
  height: 16px;
}

.s243-search-field .s214-icon svg {
  width: 16px;
  height: 16px;
}

.s243-search-field input {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f4f4f5;
  font: inherit;
  font-size: 14px;
  cursor: text;
}

.s243-search-field input::placeholder {
  color: #a6a7ad;
  opacity: 1;
}

.s214-search-result-note {
  margin: 0 2px 8px;
  padding: 7px 9px;
  border: 1px solid rgba(127, 178, 255, 0.14);
  border-radius: 8px;
  background: rgba(127, 178, 255, 0.07);
  color: #b9cfff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.s214-theme-toggle {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.s214-theme-label {
  color: #a6a7ad;
  font-size: 11px;
  font-weight: 750;
}

.s214-theme-choice {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: #d7d9df;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.s214-theme-choice:hover,
.s214-theme-choice.is-active {
  border-color: rgba(127, 178, 255, 0.34);
  background: rgba(127, 178, 255, 0.12);
  color: #f4f4f5;
}

body[data-hq-theme="light"] .s214-sidebar,
.app[data-hq-theme="light"] .s214-sidebar {
  background: #f4f6f8;
  color: #1d2430;
  border-right-color: rgba(29, 36, 48, 0.12);
}

body[data-hq-theme="light"] .s214-icon,
body[data-hq-theme="light"] .s214-chev,
body[data-hq-theme="light"] .s214-time,
body[data-hq-theme="light"] .s214-theme-label,
body[data-hq-theme="light"] .s214-account-email {
  color: #5b6472;
}

body[data-hq-theme="light"] .s243-search-field,
body[data-hq-theme="light"] .s214-theme-toggle,
body[data-hq-theme="light"] .s214-theme-choice,
body[data-hq-theme="light"] .s214-search-result-note {
  background: rgba(29, 36, 48, 0.045);
  border-color: rgba(29, 36, 48, 0.12);
  color: #1d2430;
}

.s214-item,
.s214-group-toggle,
.s214-section-toggle,
.s214-chat-row,
.s214-project-row {
  width: 100%;
  height: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  font-weight: 520;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.s214-item:hover,
.s214-group-toggle:hover,
.s214-section-toggle:hover,
.s214-chat-row:hover,
.s214-project-row:hover,
.s214-subitem:hover,
.s214-icon-button:hover {
  background: rgba(255, 255, 255, 0.055);
}

.s214-item[disabled],
.s214-subitem[disabled],
.s214-icon-button[disabled],
.s214-project-row[disabled],
.s214-sidebar-toggle[disabled],
.s214-settings-button[disabled] {
  cursor: default;
  opacity: 0.48;
}

.s214-item[disabled]:hover,
.s214-subitem[disabled]:hover,
.s214-icon-button[disabled]:hover,
.s214-project-row[disabled]:hover,
.s214-sidebar-toggle[disabled]:hover,
.s214-settings-button[disabled]:hover {
  background: transparent;
}

.s214-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b7b8bf;
}

.s214-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s214-label,
.s214-title,
.s214-project-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s214-chev,
.s214-time {
  margin-left: auto;
  flex: 0 0 auto;
  color: #a6a7ad;
  white-space: nowrap;
}

.s214-time {
  padding-left: 10px;
  font-size: 13px;
  font-weight: 560;
  color: #9b9ca3;
}

.s214-group-panel[hidden],
.s214-section-body[hidden],
.s214-subpanel[hidden] {
  display: none !important;
}

.s214-group-panel,
.s214-subpanel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 5px;
}

.s214-agent-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.s214-agent-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.s214-agent-info {
  min-width: 0;
  flex: 1 1 auto;
}

.s214-agent-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.s214-agent-name {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s214-agent-status {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  text-transform: lowercase;
}

.s214-status-active,
.s214-status-ok {
  background: rgba(62, 194, 127, 0.18);
  color: #66e2a0;
}

.s214-status-idle {
  background: rgba(140, 147, 164, 0.16);
  color: #b7b8bf;
}

.s214-status-partial,
.s214-status-blocked {
  background: rgba(240, 179, 64, 0.16);
  color: #f0b340;
}

.s214-status-unavailable,
.s214-status-failed {
  background: rgba(224, 98, 92, 0.16);
  color: #ff8d86;
}

.s214-agent-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #a6a7ad;
  line-height: 1.35;
}

.s214-agent-meta {
  margin-top: 3px;
  font-size: 10.5px;
  color: #8f9098;
  line-height: 1.3;
}

.s214-selector-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px 2px;
}

.s214-selector-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.s214-selector-label {
  font-size: 13px;
  color: #b7b8bf;
  font-weight: 560;
}

.s214-selector-select {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #f4f4f5;
  font: inherit;
  font-size: 13px;
  padding: 0 8px;
}

.s214-selector-note {
  font-size: 11px;
  color: #9b9ca3;
  line-height: 1.35;
}

.s214-subitem {
  width: 100%;
  height: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.s214-subitem-nested {
  height: 32px;
  min-height: 32px;
  padding-left: 52px;
  font-size: 15px;
  color: #d8d8dd;
}

.s214-section {
  margin-top: 15px;
}

.s214-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.s214-section-toggle {
  height: 32px;
  min-height: 32px;
  padding: 0 6px 0 10px;
  font-size: 15px;
  font-weight: 680;
  color: #f7f7f8;
}

.s214-section-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s214-empty {
  padding: 7px 10px 8px 38px;
  color: #9b9ca3;
  font-size: 13px;
  font-style: italic;
}

.s214-chat-row,
.s214-project-row {
  height: 34px;
  min-height: 34px;
  line-height: 20px;
  gap: 8px;
  padding: 0 7px 0 10px;
  font-size: 15px;
  font-weight: 500;
  transform: none !important;
  transition: background-color 120ms ease, color 120ms ease, opacity 120ms ease;
  will-change: auto;
}

.s214-chat-row.is-active,
.s214-project-row.is-active {
  background: rgba(255, 255, 255, 0.075);
}

.s214-project-row.is-expanded:not(.is-active) {
  background: rgba(255, 255, 255, 0.035);
}

.s214-chat-row:hover,
.s214-project-row:hover {
  transform: none !important;
}

.s214-chat-row .s214-title,
.s214-project-row .s214-project-name {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
}

.s214-project-row .s214-icon,
.s214-chat-row .s214-icon {
  width: 18px;
  height: 18px;
}

.s214-project-row .s214-chev {
  width: 18px;
  min-width: 18px;
  text-align: center;
  line-height: 20px;
}

.s214-project-chat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s214-chat-row.s214-project-chat {
  padding-left: 36px;
}

.s214-project-empty {
  padding-left: 38px;
}

.s214-pin {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #9b9ca3;
  cursor: pointer;
}

.s214-row-menu {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #9b9ca3;
  cursor: pointer;
}

.s214-pin:hover,
.s214-row-menu:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #f4f4f5;
}

.s214-pin.is-pinned {
  color: #f4f4f5;
}

.s214-spinner {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d7d7de;
}

.s214-icon-button {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #9b9ca3;
  cursor: pointer;
}

.s214-icon-button .s214-icon {
  width: 100%;
  height: 100%;
}

.s214-founder-today {
  margin: 8px 0 10px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.s214-founder-today-title {
  grid-column: 1 / -1;
  color: #f7f7f8;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0;
}

.s214-founder-chip {
  min-width: 0;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: rgba(255,255,255,.055);
  color: #d8d8dd;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s214-founder-chip:hover {
  background: rgba(255,255,255,.09);
  color: #f7f7f8;
}

.s214-founder-chip.primary {
  background: rgba(91,141,239,.18);
  color: #9bc5ff;
}

.s214-project-create {
  min-height: 30px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c9c9cf;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
}

.s214-project-create .s214-icon {
  width: 16px;
  height: 16px;
}

.s214-project-create:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #f4f4f5;
}

.s214-project-create[aria-disabled="true"] {
  opacity: .72;
}

.s214-menu,
.s242-context-menu {
  position: fixed;
  z-index: 20;
  width: 236px;
  max-height: min(420px, calc(100vh - 16px));
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: #2a2b30;
  color: #f4f4f5;
}

.s214-menu-item {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.s214-menu-item:hover {
  background: rgba(255, 255, 255, 0.055);
}

.s214-menu-item[disabled] {
  cursor: default;
  opacity: 0.5;
}

.s214-menu-item[disabled]:hover {
  background: transparent;
}

.s214-menu-item.danger {
  color: #ffb4b4;
}

.s214-menu-sep {
  height: 1px;
  margin: 5px 4px;
  background: rgba(255, 255, 255, 0.07);
}

.s242-menu-label {
  padding: 5px 10px 4px;
  color: #a6a7ad;
  font-size: 12px;
  font-weight: 650;
}

.s242-transfer-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.s242-transfer-project span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s242-menu-check {
  flex: 0 0 auto;
  color: #9b9ca3;
  font-size: 11px;
}

.s214-build-tag {
  margin-top: 4px;
  padding: 0 12px;
  color: rgba(236, 236, 241, 0.34);
  font-size: 10px;
  user-select: none;
}

.s214-footer-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}

.s214-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 8px 2px;
  min-width: 0;
}

.s214-legal-link {
  min-width: 0;
  color: #9b9ca3;
  font-size: 11.5px;
  font-weight: 620;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.s214-legal-link:hover {
  color: #9bc5ff;
  text-decoration: underline;
}

/* HQ100_037_FOUNDER_HIDE_YOU_ARE_HERE: keep route badges out of Founder mode, but available in technical view. */
body:not(.technical-view) [data-founder-badge="you-are-here"],
body:not(.technical-view) [data-badge="you-are-here"],
body:not(.technical-view) .you-are-here,
body:not(.technical-view) .voce-esta-aqui,
body:not(.technical-view) .vce-esta-aqui {
  display: none !important;
}

.s214-account {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.s214-account:hover,
.s214-settings-button:hover {
  background: rgba(255, 255, 255, 0.055);
}

.s214-account-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s214-account-role {
  color: #f4f4f5;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 650;
}

.s214-account-role.is-founder {
  color: #39FF14;
}

.s214-account-email {
  min-width: 0;
  color: #9b9ca3;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s214-settings-button {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b7b8bf;
  cursor: pointer;
}

body.s241-sidebar-collapsed .app,
.app.s241-sidebar-collapsed {
  grid-template-columns: 52px minmax(0, 1fr) 300px !important;
}

body.s241-sidebar-collapsed .s214-sidebar,
.s214-sidebar.s241-sidebar-collapsed {
  width: 52px;
  min-width: 52px;
  padding: 10px 8px;
}

.s214-sidebar.s241-sidebar-collapsed .s214-sidebar-toolbar {
  justify-content: center;
}

.s214-sidebar.s241-sidebar-collapsed .s243-search-field {
  display: none !important;
}

.s214-sidebar.s241-sidebar-collapsed .s214-top > .s214-item,
.s214-sidebar.s241-sidebar-collapsed .s214-group-toggle,
.s214-sidebar.s241-sidebar-collapsed .s214-group-panel,
.s214-sidebar.s241-sidebar-collapsed .s214-scroll,
.s214-sidebar.s241-sidebar-collapsed .s214-footer {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

body:not(.technical-view) #tb-technical-view,
body:not(.technical-view) #rp-detail-toggle {
  display: none !important;
}

/* HQ100_038_R5: Founder mode keeps reset-layout controls out of the visible menu. */
body:not(.technical-view) .s214-founder-hidden-reset,
body:not(.technical-view) [data-founder-hidden-reset="true"] {
  display: none !important;
}

.s214-pinned-helper {
  line-height: 1.35;
  white-space: normal;
}


/* HQ100_R6_CANONICAL_BATCH: admin shell, breadcrumb, project context and agent actions. */
.s214-founder-chip-link {
  text-decoration: none;
  align-items: center;
  justify-content: center;
}

.s214-r6-context {
  margin: 8px 0 4px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  display: grid;
  gap: 8px;
}

.s214-r6-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: #cfd2da;
  font-size: 11px;
  line-height: 1.25;
}

.s214-r6-project-strip,
.s214-r6-agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.s214-r6-project-chip,
.s214-r6-agent-actions button {
  min-height: 26px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px;
  background: rgba(255,255,255,.045);
  color: #d8dbe3;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}

.s214-r6-project-chip {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s214-r6-project-chip.is-active {
  border-color: rgba(95,179,255,.45);
  color: #d8ecff;
  background: rgba(95,179,255,.12);
}

.s214-r6-empty {
  color: #9b9ca3;
  font-size: 11px;
}

body.s241-sidebar-collapsed .s214-r6-context {
  display: none !important;
}


/* HQ100_R8_REVIEW_BATCH · mobile sidebar drawer */
.s214-mobile-drawer-button {
  display: none;
}

@media (max-width: 768px) {
  .app,
  body.nav-normal-sidebar .app,
  .app.nav-normal-sidebar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .s214-sidebar {
    position: fixed;
    z-index: 60;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    min-width: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 40px rgba(0, 0, 0, .35);
  }

  body.s214-mobile-sidebar-open .s214-sidebar {
    transform: translateX(0);
  }

  .s214-mobile-drawer-button {
    display: inline-flex;
    position: fixed;
    z-index: 70;
    left: 12px;
    bottom: 14px;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(127, 178, 255, .36);
    border-radius: 8px;
    background: #202123;
    color: #f4f4f5;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .30);
  }
}
