/* Home shell — rail lateral + padding unificado das 5 abas */
:root {
  --lee-rail-w: 130px;
  --lee-shell-pad-x: 28px;
  --lee-shell-pad-y: 24px;
  --lee-shell-content-max: 980px;
  --lee-shell-top: 0px;
  --lee-panel-radius: 14px;
}

body.lee-desktop {
  --lee-shell-top: var(--desktop-titlebar, 32px);
  background: var(--bg) !important;
}

html,
body.lee-desktop,
body.lee-desktop.modo-manha,
body.lee-desktop.atualizar-estado-wizard-open,
body.lee-shell-page-open {
  background: var(--bg) !important;
}

body.lee-desktop::before,
body.modo-manha::before,
body.lee-desktop.modo-manha::before {
  display: none !important;
}

/* Faixa de chrome contínua com a borda da janela — elimina costura com o conteúdo */
body.lee-desktop::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: calc(var(--lee-rail-w) + var(--lee-panel-radius));
  background: var(--rail);
  z-index: 170;
  pointer-events: none;
}

/* Cantos em C: painéis ficam acima da sidebar estendida — a cor da sidebar aparece nos cantos */
body.lee-desktop .airtrace-panel,
body.lee-desktop .lee-memoria-panel,
body.lee-desktop .lee-projetos-panel,
body.lee-desktop .lee-orquestracao-panel,
body.lee-desktop .lee-eu-futuro-panel,
body.lee-desktop #config-panel.open {
  border-top-left-radius: var(--lee-panel-radius);
  border-bottom-left-radius: var(--lee-panel-radius);
  overflow: hidden;
}

body.lee-desktop select,
body.lee-mobile select {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.92);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

body.lee-desktop select:focus,
body.lee-mobile select:focus {
  outline: none;
  border-color: rgba(67, 94, 70, 0.38);
  box-shadow: 0 0 0 3px rgba(67, 94, 70, 0.1);
}

body.lee-desktop .lee-home-rail {
  padding-top: calc(var(--desktop-titlebar, 32px) + 10px);
  background: transparent;
  border-right: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.lee-home-rail {
  display: none;
}

body.lee-mobile::after {
  display: none !important;
}

body.lee-mobile .lee-home-rail {
  display: none !important;
}

body.modo-manha .lee-home-rail,
body.atualizar-estado-wizard-open .lee-home-rail,
body.lee-shell-page-open .lee-home-rail {
  display: flex;
}

.lee-home-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 180;
  width: max-content;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 18px;
  background: var(--rail);
  border-right: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
  transition: width 0.18s ease;
}

.lee-home-rail-top,
.lee-home-rail-foot {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lee-home-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  padding: 0 6px;
  box-sizing: border-box;
}

.lee-rail-section-label {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 10px 10px 4px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.lee-rail-section-label:first-child {
  padding-top: 4px;
}

/* — Nav items — */
.lee-home-rail-btn {
  width: calc(100% - 12px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-btn);
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}
.lee-home-rail-btn:hover {
  background: rgba(36, 37, 31, 0.04);
  color: var(--ink);
}
.lee-home-rail-btn.active {
  background: rgba(36, 37, 31, 0.06);
  color: var(--ink);
}
.lee-home-rail-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.lee-home-rail-label {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.lee-home-rail-nav {
  padding: 0 6px;
}
.lee-rail-nav-group {
  align-items: flex-start;
}

.lee-home-rail-atualizar {
  width: calc(100% - 16px);
  max-width: 64px;
  min-height: 34px;
  padding: 6px 4px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #4d7260 0%, var(--accent) 42%, #324a3a 100%);
  color: #fff;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(36, 37, 31, 0.12),
    0 4px 14px rgba(63, 95, 76, 0.34),
    0 0 22px rgba(63, 95, 76, 0.18);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.15s ease;
}

.lee-home-rail-atualizar:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 4px rgba(36, 37, 31, 0.14),
    0 6px 18px rgba(63, 95, 76, 0.4),
    0 0 28px rgba(63, 95, 76, 0.26);
}

.lee-home-rail-atualizar.is-busy {
  opacity: 0.65;
  pointer-events: none;
  filter: none;
  transform: none;
}

.lee-mobile-shell-nav {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 190;
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(36, 37, 31, 0.08);
  background: rgba(249, 248, 244, 0.88);
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  box-shadow: 0 10px 30px rgba(36, 37, 31, 0.12);
}

.lee-mobile-shell-nav-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 0;
  border-radius: 12px;
  color: var(--ink-soft);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.lee-mobile-shell-nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.lee-mobile-shell-nav-btn.active {
  background: rgba(63, 95, 76, 0.12);
  color: var(--accent);
}

.lee-mobile-shell-nav-btn:hover {
  background: rgba(36, 37, 31, 0.04);
  color: var(--ink);
}

.lee-app-update-float {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 18px;
  bottom: 80px;
  z-index: 185;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #4d7260 0%, var(--accent) 42%, #324a3a 100%);
  color: #fff;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 6px rgba(36, 37, 31, 0.14),
    0 8px 22px rgba(63, 95, 76, 0.36),
    0 0 26px rgba(63, 95, 76, 0.2);
  pointer-events: auto;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.lee-app-update-float:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px rgba(36, 37, 31, 0.16),
    0 10px 28px rgba(63, 95, 76, 0.42),
    0 0 32px rgba(63, 95, 76, 0.28);
}

.lee-app-update-float[hidden] {
  display: none !important;
}

.lee-app-update-float.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.lee-rail-ground {
  width: calc(100% - 16px);
  max-width: 86px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: var(--radius-btn);
  border: none;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-soft);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.15s ease, backdrop-filter 0.18s ease;
}

.lee-rail-ground:hover {
  background: rgba(255, 255, 255, 0.44);
  color: var(--ink);
}

.lee-rail-ground-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex-shrink: 0;
}

.lee-rail-ground[data-status="attention"] .lee-rail-ground-dot,
.lee-rail-ground--recording .lee-rail-ground-dot {
  background: var(--accent);
  animation: ground-recording-pulse 1.25s ease-in-out infinite;
}

.lee-rail-ground[data-status="critical"] .lee-rail-ground-dot {
  background: var(--danger);
}

.ground-panel {
  position: fixed;
  left: calc(var(--lee-rail-w) + var(--lee-shell-pad-x));
  bottom: 18px;
  z-index: 180;
  width: min(320px, calc(100vw - var(--lee-rail-w) - (var(--lee-shell-pad-x) * 2)));
  pointer-events: auto;
}

.ground-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.ground-panel[data-status="attention"] .ground-dot { background: var(--warn); }
.ground-panel[data-status="critical"] .ground-dot { background: var(--danger); }

.ground-body {
  pointer-events: auto;
  display: none;
  padding: 12px;
  border: 1px solid rgba(36, 37, 31, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(36, 37, 31, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ground-panel.open .ground-body {
  display: block;
}

.ground-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ground-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.ground-actions {
  display: inline-flex;
  align-items: center;
}

.ground-close {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-faint);
  font-size: 16px;
  line-height: 1;
}

.ground-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.ground-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ground-tool {
  min-width: 72px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(36, 37, 31, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink-soft);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3px;
  text-align: left;
}

.ground-tool:disabled {
  opacity: 1;
  cursor: default;
}

.ground-tool-name {
  display: block;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ground-tool-time {
  display: block;
  font-size: 12px;
  line-height: 1;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.ground-tool[data-state="ativa"],
.ground-tool[data-state="em_uso"] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.ground-tool[data-state="ativa"] .ground-tool-name,
.ground-tool[data-state="em_uso"] .ground-tool-name {
  color: var(--accent);
}

.ground-findings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ground-finding {
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(36, 37, 31, 0.06);
}

.ground-finding[data-severity="critical"] {
  color: var(--danger);
  background: var(--danger-soft);
}

.ground-finding[data-severity="warning"] {
  color: var(--warn);
}

.ground-empty {
  font-size: 12px;
  color: var(--ink-faint);
}

/* —— Home (com rail) —— */
body.modo-manha .modal-layer {
  z-index: 120 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  padding: calc(var(--lee-shell-top) + var(--lee-shell-pad-y)) var(--lee-shell-pad-x) var(--lee-shell-pad-y) calc(var(--lee-rail-w) + var(--lee-shell-pad-x)) !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  box-sizing: border-box;
  pointer-events: none;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.modo-manha::before {
  background: var(--bg) !important;
}

body.lee-mobile.modo-manha .modal-layer,
body.lee-mobile.atualizar-estado-wizard-open:not(.wizard-decisao) .modal-layer {
  padding-left: var(--lee-shell-pad-x) !important;
}

body.modo-manha #map-bg {
  display: none !important;
}

body.modo-manha .wizard-anchor {
  width: 100% !important;
  max-width: none !important;
  flex: 1;
  min-height: 0;
  height: 100%;
  pointer-events: none;
}

body.modo-manha .modal-card {
  width: 100% !important;
  max-width: none !important;
  flex: 1;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  pointer-events: auto;
}

body.modo-manha .wizard-stage {
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.modo-manha .wizard-body {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 0 !important;
  pointer-events: auto;
}

body.modo-manha .manha-briefing {
  width: 100% !important;
  max-width: 760px !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 12px 0 56px !important;
  align-items: center;
  gap: 32px;
}

body.lee-desktop.modo-manha .manha-briefing {
  padding: 0 0 56px !important;
  max-width: 760px !important;
  margin: 0 auto !important;
}

body.modo-manha .manha-hero {
  width: 100%;
  max-width: 42em;
  gap: 18px;
  padding-top: 0;
  margin: 0 auto;
  align-items: center;
  text-align: center;
}

body.modo-manha .manha-hora {
  font-size: clamp(52px, 7vw, 84px);
  line-height: 0.95;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
}

body.modo-manha .manha-sintese {
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
  max-width: 42em;
}

body.modo-manha .manha-btn-atualizar {
  width: auto;
  min-width: min(360px, 100%);
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #4d7260 0%, var(--accent) 42%, #324a3a 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 6px rgba(36, 37, 31, 0.12),
    0 8px 24px rgba(63, 95, 76, 0.34),
    0 0 32px rgba(63, 95, 76, 0.18);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

body.modo-manha .manha-btn-atualizar:hover {
  background: linear-gradient(180deg, #527a62 0%, #456652 42%, #364f3f 100%);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px rgba(36, 37, 31, 0.14),
    0 12px 32px rgba(63, 95, 76, 0.4),
    0 0 40px rgba(63, 95, 76, 0.24);
}

body.modo-manha .manha-perplexity {
  grid-template-columns: minmax(0, 1fr) !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto !important;
}

body.modo-manha .manha-feed,
body.modo-manha .manha-feed-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

body.modo-manha .manha-sinais-head {
  max-width: 100%;
  text-align: center;
  margin: 0 auto 16px;
}

body.modo-manha .feed-perplexity {
  gap: 28px;
}

body.lee-desktop.modo-manha .modal-card {
  background: transparent !important;
}

/* Home desktop: modal-layer encosta na sidebar para o C aparecer; z=171 cobre a extensão da sidebar (z=170) */
body.lee-desktop.modo-manha:not(.atualizar-estado-wizard-open):not(.wizard-decisao) .modal-layer {
  left: var(--lee-rail-w) !important;
  padding-left: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background: var(--bg) !important;
  border-top-left-radius: var(--lee-panel-radius) !important;
  border-bottom-left-radius: var(--lee-panel-radius) !important;
  overflow: hidden !important;
  z-index: 171 !important;
}

/* Home desktop: respiro do conteúdo vem do corpo, não do container, para alinhar com os outros painéis */
body.lee-desktop.modo-manha:not(.atualizar-estado-wizard-open):not(.wizard-decisao) .wizard-body {
  padding-left: var(--lee-shell-pad-x) !important;
  padding-top: calc(var(--lee-shell-top) + (var(--lee-shell-pad-y) / 2)) !important;
  padding-bottom: var(--lee-shell-pad-y) !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.lee-desktop.modo-manha:not(.atualizar-estado-wizard-open):not(.wizard-decisao) .wizard-body::-webkit-scrollbar {
  display: none;
}

/* —— Atualizar estado (sinais + regência) —— */
body.atualizar-estado-wizard-open::before {
  display: block !important;
  left: var(--lee-rail-w) !important;
  background: linear-gradient(
    to right,
    rgb(var(--chrome-rgb)) 0%,
    rgba(var(--chrome-rgb), 0.97) 16%,
    rgba(var(--chrome-rgb), 0.72) 30%,
    rgba(var(--chrome-rgb), 0.38) 44%,
    rgba(var(--chrome-rgb), 0.12) 56%,
    transparent 68%
  ) !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .modal-layer {
  z-index: 120 !important;
  padding: calc(var(--lee-shell-top) + 72px) var(--lee-shell-pad-x) var(--lee-shell-pad-y) calc(var(--lee-rail-w) + var(--lee-shell-pad-x)) !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  pointer-events: none;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-anchor {
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
  gap: 14px;
  pointer-events: none;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .modal-card {
  width: 100% !important;
  max-width: 460px !important;
  min-height: 0 !important;
  max-height: calc(100vh - var(--lee-shell-top) - 96px) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(28px) saturate(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(1.08);
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  border-radius: var(--radius) !important;
  box-shadow:
    0 16px 48px rgba(36, 37, 31, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
  pointer-events: auto;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-question {
  font-size: clamp(26px, 3.4vw, 34px) !important;
  line-height: 1.16 !important;
  font-weight: 650 !important;
  letter-spacing: -0.025em;
  color: var(--ink) !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-hint:not(.wizard-calibracao-lead) {
  font-size: 13px;
  color: var(--ink-faint) !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-calibracao-lead {
  display: none;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .estado-cena-float {
  display: none !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) #map-bg {
  left: var(--lee-rail-w) !important;
  right: 0 !important;
  width: auto !important;
  top: 0 !important;
  bottom: 0 !important;
  opacity: 0.36;
  filter: saturate(0.65) brightness(1.03);
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .hud-anchor {
  left: calc(var(--lee-rail-w) + var(--lee-shell-pad-x)) !important;
  top: calc(var(--lee-shell-top) + 12px) !important;
  z-index: 180 !important;
  opacity: 0.5;
  background: rgba(255, 255, 255, 0.28) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: none !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .hud-linha .hud-celula {
  color: var(--ink-soft) !important;
  font-size: 12px;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-progress {
  background: rgba(36, 37, 31, 0.05) !important;
  border-radius: 2px;
  height: 3px !important;
  opacity: 0.55;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-step-label {
  color: var(--ink-faint) !important;
  font-size: 10px !important;
  letter-spacing: 0.1em;
  opacity: 0.72;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .modal-header {
  padding-bottom: 6px !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-body .intake-chips {
  margin-top: 4px;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-body .intake-chips .chip {
  background: rgba(255, 255, 255, 0.32) !important;
  border-color: rgba(229, 228, 224, 0.85) !important;
  color: var(--ink-soft) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-body .intake-chips .chip:hover:not(.active) {
  background: rgba(255, 255, 255, 0.48) !important;
  border-color: var(--border-strong) !important;
  color: var(--ink) !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-body .intake-chips .chip.active {
  background: rgba(233, 239, 232, 0.55) !important;
  border-color: var(--accent-line) !important;
  color: var(--accent) !important;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35) !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-body .intake-chips .chip-with-icon.active .chip-icon {
  color: var(--accent) !important;
  opacity: 1;
}

.wizard-transition {
  display: grid;
  gap: 18px;
  min-height: 280px;
  align-content: center;
}

.wizard-transition__kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0.8;
}

.wizard-transition__track {
  display: grid;
  gap: 14px;
  align-items: center;
}

.wizard-transition__node {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(226, 224, 217, 0.88);
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.wizard-transition__node-kicker {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wizard-transition__node-label {
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.wizard-transition__bridge {
  position: relative;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-transition__bridge::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(87, 110, 93, 0.1) 0%, rgba(87, 110, 93, 0.42) 48%, rgba(87, 110, 93, 0.08) 100%);
}

.wizard-transition__bridge span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(76, 114, 96, 0.72);
  box-shadow: 0 0 0 0 rgba(76, 114, 96, 0.32);
  animation: wizard-transition-pulse 2.4s ease-in-out infinite;
}

.wizard-transition__node--regencia {
  border-color: rgba(199, 211, 202, 0.96);
}

.wizard-transition__node--curadoria .wizard-transition__node-label {
  color: #355543;
}

.wizard-transition__node--estruturar .wizard-transition__node-label {
  color: #5c513f;
}

.wizard-transition__node--executar .wizard-transition__node-label,
.wizard-transition__node--overclock .wizard-transition__node-label {
  color: #365342;
}

.wizard-transition__node--recuperar .wizard-transition__node-label {
  color: #4e6648;
}

@keyframes wizard-transition-pulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.7;
    box-shadow: 0 0 0 0 rgba(76, 114, 96, 0.12);
  }
  50% {
    transform: scale(1.14);
    opacity: 1;
    box-shadow: 0 0 0 12px rgba(76, 114, 96, 0.04);
  }
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-nav {
  background: rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.42) !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-nav .btn {
  background: rgba(255, 255, 255, 0.28) !important;
  border-color: rgba(229, 228, 224, 0.9) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-nav .btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: linear-gradient(180deg, #4d7260 0%, var(--accent) 42%, #324a3a 100%) !important;
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 6px rgba(36, 37, 31, 0.1),
    0 8px 22px rgba(63, 95, 76, 0.28),
    0 0 28px rgba(63, 95, 76, 0.14) !important;
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-nav .btn-primary:hover {
  background: linear-gradient(180deg, #527a62 0%, #456652 42%, #364f3f 100%) !important;
  filter: brightness(1.03);
}

body.atualizar-estado-wizard-open:not(.wizard-decisao) .daily-panel {
  top: calc(var(--lee-shell-top) + 12px) !important;
  right: var(--lee-shell-pad-x) !important;
  z-index: 180 !important;
  opacity: 0.45;
}

/* —— Regência (pós-wizard / decisão) —— */
body.wizard-decisao .modal-layer {
  z-index: 171 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: var(--lee-rail-w, 76px) !important;
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  pointer-events: none;
  background: var(--bg) !important;
  border-top-left-radius: var(--lee-panel-radius) !important;
  border-bottom-left-radius: var(--lee-panel-radius) !important;
}

body.lee-mobile.wizard-decisao .modal-layer {
  left: 0 !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

body.wizard-decisao .wizard-anchor {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  min-height: 0;
  height: auto !important;
  margin: 0 !important;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

body.wizard-decisao .modal-card {
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  pointer-events: auto;
}

body.wizard-decisao .wizard-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  max-width: 100% !important;
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
}

body.wizard-decisao .wizard-body {
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  padding: 0;
  align-self: stretch !important;
}

body.wizard-decisao .wizard-nav {
  flex-shrink: 0;
  margin: 0;
  padding: 18px 0 0;
  border-top: none;
  background: transparent;
  display: flex;
  justify-content: center;
}

body.wizard-decisao .wizard-nav .btn-ghost {
  flex: 0 1 auto;
  min-width: 0;
  background: var(--surface-alt);
  color: var(--ink);
}

body.wizard-decisao .wizard-nav .btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

body.wizard-decisao .wizard-nav .btn-primary {
  flex: 1.4 1 auto;
  min-width: 0;
}

body.wizard-decisao .hud-anchor {
  display: none !important;
}

body.atualizar-estado-wizard-open.regencia-ambient-mounted #map-bg {
  left: auto !important;
  right: auto !important;
  width: 100% !important;
}

body.wizard-decisao:not(.regencia-ambient-mounted) #map-bg {
  left: var(--lee-rail-w) !important;
  right: 0 !important;
  width: auto !important;
  opacity: 0.28;
  filter: saturate(0.55) brightness(1.03);
  border-top-left-radius: var(--lee-panel-radius);
  border-bottom-left-radius: var(--lee-panel-radius);
  overflow: hidden;
}

/* Mapa em standby na Regência pós-wizard: mantido no DOM, oculto da UI */
body.wizard-decisao #map-bg,
body.wizard-decisao .regencia-surface__map-body,
body.wizard-decisao .regencia-surface__map-head {
  display: none !important;
}

body.regencia-ambient-mounted #map-bg {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  opacity: 1 !important;
  filter: saturate(0.92) contrast(1) !important;
  z-index: 0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  transition: none;
}

body.regencia-ambient-mounted #map {
  position: absolute;
  inset: 0;
  min-height: 0;
}


body.regencia-ambient-mounted .daily-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* —— Superfície de leitura da regência (hero layout) —— */
.regencia-surface {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  color: var(--ink);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Botão Ajustar regência — dentro do card, abaixo da trilha */
.regencia-ajustar-wrap {
  display: flex;
  justify-content: center;
  padding: 22px 0 4px;
}

.regencia-ajustar-wrap .btn-ghost {
  background: var(--surface-alt);
  color: var(--ink);
}

.regencia-ajustar-wrap .btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.regencia-surface__map-card {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 0;
  border: none;
  background: transparent;
}

.regencia-surface__map-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(245, 243, 238, 0.45) 0%,
    rgba(245, 243, 238, 0.68) 50%,
    rgba(245, 243, 238, 0.55) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.regencia-surface__map-head {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
}

.regencia-surface__map-body {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* SCROLL LAYER: conteúdo scrollável por cima do mapa */
.regencia-surface__core {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 40px 40px;
  box-sizing: border-box;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
}

body.wizard-decisao .regencia-surface__core {
  padding-top: var(--lee-shell-top);
}

.regencia-surface__kicker,
.regencia-surface__meta-kicker,
.regencia-surface__card-kicker,
.regencia-surface__panel-kicker,
.regencia-surface__trilha-kicker,
.regencia-surface__mini-kicker,
.regencia-surface__bound-label {
  display: block;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── HERO: kicker + título + projeto abaixo ── */
.regencia-surface__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 0 28px;
}

body.wizard-decisao .regencia-surface__hero {
  padding-top: 0;
  padding-bottom: 20px;
}

body.wizard-decisao .regencia-surface__hero {
  padding-top: 0;
  padding-bottom: 20px;
}

.regencia-surface__hero .regencia-surface__kicker {
  margin-bottom: 6px;
}

/* Projeto wrap: logo abaixo do título */
.regencia-surface__projeto-wrap {
  margin: 20px auto 0;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

/* BOUNDS: 2 colunas allow | avoid */
.regencia-surface__bounds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  padding: 20px 0 20px;
  border-top: 1px solid rgba(36, 37, 31, 0.1);
  border-bottom: 1px solid rgba(36, 37, 31, 0.1);
}

.regencia-surface__bound {
  text-align: center;
}

.regencia-surface__bound-label { margin: 0 0 8px; }

.regencia-surface__bound .regencia-surface__list {
  justify-content: center;
}

/* TAREFAS */
.regencia-surface__tasks-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(36, 37, 31, 0.1);
}

.regencia-surface__section-label {
  display: block;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

/* TRILHA strip */
.regencia-surface__trilha-strip {
  padding: 18px 0 20px;
  text-align: center;
}

.regencia-surface__trilha-strip .regencia-surface__trilha-artistas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

.regencia-surface__title {
  margin: 4px 0 0;
  font-family: var(--font);
  font-size: clamp(52px, 6.5vw, 80px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.regencia-surface__reading { display: none; }

/* chips */
.regencia-surface__list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.regencia-surface__list li {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink-soft);
  background: rgba(36, 37, 31, 0.05);
}

.regencia-surface__list li::before { display: none; }
.regencia-surface__list li + li { margin-top: 0; }

.regencia-surface__bound--allow .regencia-surface__bound-label { color: #3a6347; }
.regencia-surface__bound--allow .regencia-surface__list li {
  background: rgba(58, 99, 71, 0.09);
  color: #2a5538;
}

.regencia-surface__bound--avoid .regencia-surface__bound-label { color: #7a4a30; }
.regencia-surface__bound--avoid .regencia-surface__list li {
  background: rgba(138, 80, 50, 0.09);
  color: #7a4030;
}

/* ── CARDS ROW (legado, mantido para compatibilidade) ── */
.regencia-surface__cards {
  display: flex;
  flex-shrink: 0;
}

.regencia-surface__card {
  border: 1px solid rgba(36, 37, 31, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  padding: 12px 13px 13px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.regencia-surface__card-kicker { margin-bottom: 10px; }

.regencia-surface__mini-body {
  flex: 1;
  min-width: 0;
}

/* Projeto: CTA when empty */
.regencia-surface__projeto-empty {
  display: inline-block;
  width: auto;
  padding: 9px 16px;
  border: 1.5px dashed rgba(36, 37, 31, 0.2);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-faint);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.regencia-surface__projeto-empty:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Projeto: quando vinculado */
.regencia-surface__projeto-vinculado {
  appearance: none;
  display: inline-block;
  position: relative;
  width: auto;
  max-width: 100%;
  padding: 9px 24px;
  border: 1.5px dashed rgba(36, 37, 31, 0.2);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-faint);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.regencia-surface__projeto-text {
  display: block;
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
  white-space: nowrap;
}

.regencia-surface__projeto-vinculado:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.regencia-surface__projeto-vinculado:hover .regencia-surface__projeto-text {
  color: var(--accent);
}

.regencia-surface__projeto-remove {
  position: absolute;
  top: 2px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s;
}

.regencia-surface__projeto-remove:hover {
  color: var(--danger);
}

/* Trilha no card */
.regencia-surface__card--trilha .regencia-surface__trilha-artistas {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

.regencia-surface__artista-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 56px;
  text-decoration: none;
  color: inherit;
}

.regencia-surface__artista-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(36, 37, 31, 0.08);
}

.regencia-surface__artista-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.regencia-surface__artista-photo--fallback { display: none; }

.regencia-surface__artista-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 650;
  color: var(--ink-soft);
}

.regencia-surface__artista-avatar:has(.regencia-surface__artista-photo--fallback) .regencia-surface__artista-initial,
.regencia-surface__artista-avatar:not(:has(.regencia-surface__artista-photo[src])) .regencia-surface__artista-initial {
  display: flex;
}

.regencia-surface__artista-name {
  max-width: 100%;
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.regencia-surface__map-config {
  min-height: 26px;
  padding: 5px 10px;
  border: 1px solid rgba(36, 37, 31, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  position: relative;
  z-index: 10;
}

.regencia-surface__map-config:hover {
  color: var(--ink);
  border-color: rgba(36, 37, 31, 0.2);
}

#regencia-map-slot {
  height: 100%;
  min-height: 0;
}

#regencia-tasks-slot { min-width: 0; }

/* legacy compat */
.regencia-surface__mini-card {
  border: 1px solid rgba(36, 37, 31, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

/* context domain (legacy) */
.regencia-surface__context {
  width: 100%;
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.08);
}

.regencia-surface__context .context-domain-panel { margin: 0; padding: 0; border: none; background: transparent; }
.regencia-surface__context .context-domain-head {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.regencia-surface__context .context-domain-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.regencia-surface__context .context-domain-chip {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  font-size: 11px;
  border-color: rgba(36, 37, 31, 0.1);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink-soft);
}
.regencia-surface__context .context-domain-chip.active {
  border-color: rgba(63, 95, 76, 0.28);
  background: rgba(63, 95, 76, 0.08);
  color: var(--ink);
}
.regencia-surface__context .context-domain-clear { color: var(--ink-faint); }

/* map modal */
.regencia-surface__map-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 701;
  display: none;
  flex-direction: column;
  width: 90vw;
  max-width: 560px;
  max-height: 80vh;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.regencia-map-config-backdrop {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  background: rgba(36, 37, 31, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.regencia-map-config-backdrop.open { display: block; }
.regencia-surface__map-modal.open { display: flex; }

.regencia-surface__map-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.08);
}

.regencia-surface__map-modal-title {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.1;
  color: var(--ink);
}

.regencia-surface__map-modal-close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(36, 37, 31, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
}

.regencia-surface__map-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.regencia-surface__map-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(36, 37, 31, 0.08);
}

.regencia-surface__map-place {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(36, 37, 31, 0.08);
  border-radius: 10px;
  background: rgba(249, 248, 244, 0.9);
}

.regencia-surface__map-place-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(36, 37, 31, 0.06);
  color: var(--ink-faint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.regencia-surface__map-place-x:hover {
  background: rgba(36, 37, 31, 0.12);
  color: var(--ink-soft);
}

.regencia-surface__map-place--single { grid-template-columns: 1fr; }

.regencia-surface__map-place-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.regencia-surface__map-place-field span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.regencia-surface__map-place-field input,
.regencia-surface__map-place-field select {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(36, 37, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

.regencia-surface__map-place-status {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--ink-faint);
}

/* postura title accent */
.regencia-surface--curadoria .regencia-surface__title { color: #2f4a38; }
.regencia-surface--estruturar .regencia-surface__title { color: #4a4030; }
.regencia-surface--executar .regencia-surface__title { color: #324a3a; }
.regencia-surface--recuperar .regencia-surface__title { color: #3d5238; }

body.wizard-decisao .vetor-z-card {
  margin: 0 24px 16px;
  max-width: none;
}

body.wizard-decisao .regencia-leitura {
  max-width: none;
  margin: 0;
}

/* —— Studio + Airtrace + Memória (shell pages) —— */
body.lee-shell-page-open #map-bg,
body.lee-shell-page-open .hud-anchor,
body.lee-shell-page-open .modal-layer {
  display: none !important;
}

body.lee-shell-page-open #config-panel.open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  position: fixed;
  inset: auto;
  left: var(--lee-rail-w);
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
  max-width: none;
  height: auto;
  transform: none;
  border-radius: 0;
  border: none;
  z-index: 175;
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

body.lee-desktop.lee-shell-page-open #config-panel.open {
  border-top-left-radius: var(--lee-panel-radius);
  border-bottom-left-radius: var(--lee-panel-radius);
}

body.lee-mobile.lee-shell-page-open #config-panel.open,
body.lee-mobile.lee-shell-airtrace .airtrace-panel,
body.lee-mobile.lee-shell-memoria .lee-memoria-panel,
body.lee-mobile.lee-shell-projetos .lee-projetos-panel,
body.lee-mobile.lee-shell-orquestracao .lee-orquestracao-panel,
body.lee-mobile.lee-shell-eu-futuro .lee-eu-futuro-panel {
  left: 0;
  right: 0;
}

body.lee-mobile.lee-shell-page-open #config-panel.open {
  width: 100%;
}

body.lee-mobile.lee-shell-airtrace .airtrace-panel {
  width: 100%;
}

body.lee-mobile.lee-shell-projetos .lee-projetos-panel {
  width: 100%;
}

body.lee-mobile.lee-shell-airtrace .airtrace-panel-scroll {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
}

body.lee-mobile .airtrace-audit-input-area {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

body.lee-mobile .airtrace-audit-input-shell {
  width: 100%;
}

body.lee-mobile .airtrace-audit-input-frame {
  border-radius: 22px;
}

body.lee-mobile #config-panel.open .config-studio-close-float {
  top: calc(var(--lee-shell-top, 0px) + 12px);
  right: 12px;
}

body.lee-mobile .lee-mobile-shell-nav {
  display: flex;
}

body.lee-mobile .lee-app-update-float,
body.lee-mobile .lee-home-rail-atualizar,
body.lee-mobile .lee-rail-ground {
  display: none !important;
}

@media (max-width: 900px) {
  body.lee-desktop::after,
  .lee-home-rail,
  .lee-app-update-float,
  .lee-home-rail-atualizar,
  .lee-rail-ground {
    display: none !important;
  }

  body.lee-shell-page-open #config-panel.open,
  body.lee-shell-airtrace .airtrace-panel,
  body.lee-shell-memoria .lee-memoria-panel,
  body.lee-shell-projetos .lee-projetos-panel {
    left: 0 !important;
  }

  body.lee-shell-page-open #config-panel.open {
    width: 100%;
  }

  body.lee-shell-airtrace .airtrace-panel {
    width: 100%;
  }

  .lee-mobile-shell-nav {
    display: flex;
  }
}

body.lee-shell-studio #config-panel.open .config-studio-body {
  flex: 1;
  min-height: 0;
}

body.lee-shell-studio #config-panel.open .config-studio-canvas {
  padding: 0;
}

body.lee-shell-studio #config-panel.open .config-studio-fit-float {
  right: 22px;
  bottom: 22px;
}

body.lee-shell-studio #config-panel.open .config-studio-flow-viewport {
  border: none;
  border-radius: 0;
  clip-path: none;
  box-shadow: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle, rgba(63, 95, 76, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}

body.lee-shell-studio #config-panel.open .config-studio-canvas {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle, rgba(63, 95, 76, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}

body.lee-shell-page-open #config-panel.open .config-studio-drawer {
  background: var(--bg);
}

body.lee-shell-page-open #config-panel.open .config-studio-canvas {
  padding: 10px var(--lee-shell-pad-x) 8px;
  background-image: none;
}

body.lee-shell-studio #config-panel.open .config-studio-close-float {
  display: none;
}

/* —— Airtrace (standalone) —— */
body.lee-shell-airtrace #config-panel {
  display: none !important;
}

.airtrace-panel {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  left: var(--lee-rail-w);
  top: 0;
  background: var(--bg);
  z-index: 175;
}

body.lee-shell-airtrace .airtrace-panel {
  display: flex;
  align-items: stretch;
  text-align: left;
}

.airtrace-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: calc(var(--lee-shell-top, 0px) + 24px) 32px 0;
}

.airtrace-panel-body {
  width: 100%;
  max-width: min(920px, 100%);
  margin: 0 auto;
  text-align: left;
}

/* —— Memória —— */
body.lee-shell-memoria #config-panel {
  display: none !important;
}

.lee-memoria-panel {
  display: none;
  flex-direction: column;
  position: fixed;
  left: var(--lee-rail-w);
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 175;
  background: var(--bg);
  pointer-events: auto;
}

body.lee-shell-memoria .lee-memoria-panel {
  display: flex;
  align-items: stretch;
  text-align: left;
}

body.lee-shell-memoria .lee-memoria-head,
body.lee-shell-memoria .lee-memoria-head-copy,
body.lee-shell-memoria .lee-memoria-title,
body.lee-shell-memoria .lee-memoria-lead {
  text-align: left;
}

body.lee-shell-memoria .lee-memoria-lead {
  margin-left: 0;
  margin-right: auto;
}

body.lee-shell-memoria .lee-memoria-scroll {
  width: 100%;
  align-self: stretch;
}

body.lee-shell-memoria .lee-memoria-timeline {
  width: 100%;
  max-width: min(var(--lee-shell-content-max), 100%);
  margin: 0;
}

.lee-memoria-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: calc(var(--lee-shell-top) + var(--lee-shell-pad-y)) var(--lee-shell-pad-x) 12px;
  flex-shrink: 0;
}

.lee-memoria-title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(36px, 4.5vw, 48px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.lee-memoria-lead {
  margin: 10px 0 0;
  max-width: 36em;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.lee-memoria-lead code {
  font-size: 11px;
  color: var(--ink-faint);
  background: rgba(36, 37, 31, 0.04);
  padding: 1px 5px;
  border-radius: 4px;
}

/* —— Projetos —— */
body.lee-shell-projetos #config-panel { display: none !important; }

.lee-projetos-panel {
  display: none;
  flex-direction: column;
  position: fixed;
  left: var(--lee-rail-w);
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 175;
  background: var(--bg);
  pointer-events: auto;
}

body.lee-shell-projetos .lee-projetos-panel {
  display: flex;
  align-items: stretch;
  text-align: left;
}

.lee-projetos-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: center;
  gap: 16px;
  padding: calc(var(--lee-shell-top) + 18px) var(--lee-shell-pad-x) 26px;
  flex-shrink: 0;
}

.lee-projetos-head[hidden],
.lee-projetos-scroll[hidden],
.lee-projetos-trash-btn[hidden] {
  display: none !important;
}

.lee-projetos-add {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(28, 55, 58, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(18, 30, 32, 0.08);
  cursor: pointer;
}

.lee-projetos-add {
  justify-self: end;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
}

.lee-projetos-add:hover {
  background: rgba(255, 255, 255, 0.7);
}

.lee-projetos-title {
  justify-self: start;
  margin: 0;
  font-family: var(--font);
  font-size: clamp(36px, 4.5vw, 48px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.lee-projetos-lead {
  margin: 10px 0 0;
  max-width: 36em;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.lee-projetos-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--lee-shell-pad-x) calc(var(--lee-shell-pad-y) + 12px);
}

.lee-projetos-panel.is-detail .lee-projetos-head {
  display: none;
}

.lee-projetos-list[hidden],
.lee-projeto-detail[hidden] {
  display: none !important;
}

.lee-projetos-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.lee-projetos-empty[hidden] {
  display: none !important;
}

.lee-projetos-loading {
  padding: 24px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.lee-projetos-empty p { margin: 0; }

.lee-projetos-eu-section {
  max-width: min(820px, 100%);
  margin: 0 0 28px;
  padding-top: 7px;
}

.lee-projetos-eu-card {
  position: relative;
  width: min(260px, 100%);
  min-height: 108px;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  border: 1px solid rgba(50, 151, 214, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(50, 151, 214, 0.055), rgba(255, 255, 255, 0.16) 62%),
    rgba(255, 255, 255, 0.28);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.lee-projetos-eu-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: -7px;
  width: 42%;
  height: 15px;
  border-radius: 8px 8px 0 0;
  background: rgba(50, 151, 214, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.lee-projetos-eu-card:hover {
  transform: translateY(-2px);
  border-color: rgba(50, 151, 214, 0.28);
  background:
    linear-gradient(135deg, rgba(50, 151, 214, 0.08), rgba(255, 255, 255, 0.2) 62%),
    rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 14px 30px rgba(22, 71, 101, 0.055);
}

.lee-projetos-eu-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lee-projetos-eu-title {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.lee-projetos-eu-desc {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.lee-projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 200px));
  gap: 14px;
  max-width: min(820px, 100%);
}

.lee-projetos-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 3;
  min-height: 0;
  width: 200px;
  padding: 18px;
  border: none;
  border-radius: 8px;
  background: #f1f0ed;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.lee-projetos-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: -7px;
  width: 42%;
  height: 15px;
  border-radius: 8px 8px 0 0;
  background: #e7e5df;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.lee-projetos-card:hover {
  transform: translateY(-2px);
  background: #ebe9e4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 16px 34px rgba(18, 30, 32, 0.08);
}

.lee-projetos-card.active {
  background: #e7eee8;
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.lee-projetos-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  min-width: 0;
}

.lee-projetos-card-title {
  margin: 0;
  font-family: var(--font);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lee-projetos-card-desc {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lee-projeto-detail {
  margin: 0 calc(var(--lee-shell-pad-x) * -1);
}

.lee-projeto-detail-top {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: calc(var(--lee-shell-top) + 4px) var(--lee-shell-pad-x) 8px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.12);
}

.lee-projeto-detail-back {
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
  padding: 4px 0;
}

.lee-projeto-detail-back:hover {
  color: var(--ink);
}

.lee-projeto-detail-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px var(--lee-shell-pad-x) 20px;
}

.lee-projeto-detail-folder {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f1f0ed;
}

.lee-projeto-detail-folder::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  width: 23px;
  height: 17px;
  border: 2px solid rgba(28, 55, 58, 0.56);
  border-radius: 3px;
}

.lee-projeto-detail-folder::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 16px;
  width: 12px;
  height: 8px;
  border: 2px solid rgba(28, 55, 58, 0.56);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}

.lee-projeto-detail-copy {
  min-width: 0;
}

.lee-projeto-detail-copy h2 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.lee-projeto-detail-copy p {
  margin: 7px 0 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.lee-projeto-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--lee-shell-pad-x) 24px;
}

.lee-projeto-detail-remove {
  color: #8a3838 !important;
}

.lee-projeto-remove-copy {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

.lee-projeto-remove-confirm {
  background: #8a3838 !important;
  border-color: #8a3838 !important;
}

.lee-eu-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.lee-eu-workspace[hidden] {
  display: none !important;
}

.lee-eu-workspace-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(var(--lee-shell-top) + 12px) var(--lee-shell-pad-x) 12px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.08);
  flex-shrink: 0;
}

.lee-eu-futuro-open {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(50, 151, 214, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--ink-soft);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.lee-eu-futuro-open:hover {
  color: var(--ink);
  border-color: rgba(50, 151, 214, 0.32);
  background: rgba(50, 151, 214, 0.06);
}

.lee-eu-workspace-body {
  flex: 1;
  min-height: 0;
  padding: var(--lee-shell-pad-y) var(--lee-shell-pad-x);
}

  @media (max-width: 640px) {
  .lee-projetos-head {
    grid-template-columns: minmax(0, 1fr) 48px;
    padding: calc(var(--lee-shell-top) + 14px) 18px 22px;
  }

  .lee-projetos-add {
    width: 46px;
    height: 46px;
  }

  .lee-projetos-scroll {
    padding-left: 18px;
    padding-right: 18px;
  }

  .lee-projetos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .lee-projetos-card {
    width: auto;
    padding: 16px;
  }

  .lee-projetos-eu-card {
    width: 100%;
  }

  .lee-projeto-detail {
    margin: 0 -18px;
  }

  .lee-projeto-detail-top,
  .lee-projeto-detail-hero,
  .lee-projeto-detail-actions {
    padding-left: 18px;
    padding-right: 18px;
  }
}

.lee-projeto-edit-backdrop {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  background: rgba(36, 37, 31, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.lee-projeto-edit-backdrop.open { display: block; }

.lee-projeto-edit-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 701;
  display: none;
  flex-direction: column;
  width: 90vw;
  max-width: 460px;
  max-height: 80vh;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.lee-projeto-edit-modal.open {
  display: flex;
}

.lee-projeto-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.08);
}

.lee-projeto-edit-head h3 {
  margin: 0;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.lee-projeto-edit-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lee-projeto-edit-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: left;
}
.lee-projeto-edit-field input,
.lee-projeto-edit-field textarea,
.lee-projeto-edit-field select { width: 100%; }

.lee-projeto-edit-field input,
.lee-projeto-edit-field textarea,
.lee-projeto-edit-field select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  resize: vertical;
}

.lee-projeto-edit-avatar-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.lee-projeto-edit-avatar-preview {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  overflow: hidden;
}
.lee-projeto-edit-avatar-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lee-projeto-edit-avatar-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
}
.lee-projeto-edit-avatar-gerar {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  transition: background 0.15s;
}
.lee-projeto-edit-avatar-gerar:hover { background: var(--rail); }
.lee-projeto-edit-avatar-gerar:disabled { opacity: 0.5; cursor: default; }

.lee-projeto-edit-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(36, 37, 31, 0.08);
}

.lee-projetos-link-backdrop {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  background: rgba(36, 37, 31, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.lee-projetos-link-backdrop.open { display: block; }

.lee-projetos-link-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 701;
  display: none;
  flex-direction: column;
  width: 90vw;
  max-width: 520px;
  max-height: 80vh;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.lee-projetos-link-modal.open { display: flex; }

.lee-projetos-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.08);
}

.lee-projetos-link-head h3 {
  margin: 0;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.lee-projetos-link-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lee-projetos-link-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

.lee-projetos-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.lee-projetos-link-item:hover {
  background: var(--bg);
}

.lee-projetos-link-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
}

.lee-projetos-link-label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lee-projetos-link-label strong {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
}

.lee-projetos-link-label small {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lee-memoria-folder-head {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.lee-memoria-folder-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 10px;
  text-align: left;
  color: var(--ink);
  border-radius: var(--radius-btn);
}

.lee-memoria-folder-open:hover {
  background: rgba(36, 37, 31, 0.03);
}

.lee-memoria-folder-chevron {
  flex-shrink: 0;
  width: 28px;
  align-self: center;
  color: var(--ink-faint);
  font-size: 16px;
  line-height: 1;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.lee-memoria-folder.is-open .lee-memoria-folder-chevron {
  transform: rotate(90deg);
  color: var(--ink-soft);
}

.lee-memoria-folder-chevron:hover {
  background: rgba(36, 37, 31, 0.05);
  color: var(--ink-soft);
}

.lee-memoria-app-chip[role="button"] {
  cursor: pointer;
}

.lee-memoria-app-chip[role="button"]:hover {
  border-color: rgba(63, 95, 76, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

.lee-memoria-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--lee-shell-pad-x) calc(var(--lee-shell-pad-y) + 12px);
}

.lee-memoria-timeline {
  max-width: min(var(--lee-shell-content-max), 100%);
  position: relative;
  padding-left: 24px;
}

.lee-memoria-timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(36, 37, 31, 0.1);
}

.lee-memoria-empty {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding: 12px 0 24px;
}

.lee-memoria-active {
  position: relative;
  margin-bottom: 24px;
}

.lee-memoria-active::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(63, 95, 76, 0.14);
  animation: ground-recording-pulse 1.25s ease-in-out infinite;
}

.lee-memoria-active-kicker {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.lee-memoria-folder {
  position: relative;
  margin-bottom: 20px;
  transition: opacity 0.2s ease;
}

.lee-memoria-folder::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(36, 37, 31, 0.18);
  border: 2px solid var(--bg);
}

.lee-memoria-folder.is-open::before {
  background: var(--ink-soft);
}

.lee-memoria-folder-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 10px;
  text-align: left;
  color: var(--ink);
}

.lee-memoria-folder-icon {
  width: 18px;
  height: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(36, 37, 31, 0.18);
  border-radius: 2px 3px 3px 3px;
  background: linear-gradient(180deg, var(--panel), var(--surface-alt));
  position: relative;
}

.lee-memoria-folder-icon::before {
  content: '';
  position: absolute;
  left: -1px;
  top: -4px;
  width: 8px;
  height: 4px;
  border: 1px solid rgba(36, 37, 31, 0.18);
  border-bottom: none;
  border-radius: 2px 2px 0 0;
  background: var(--panel);
}

.lee-memoria-folder-label {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.lee-memoria-folder-count {
  margin-left: auto;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  color: var(--ink-faint);
}

.lee-memoria-folder-body {
  padding: 2px 0 4px 4px;
}

.lee-memoria-folder-body[hidden] {
  display: none;
}

.lee-memoria-matrix {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lee-memoria-matrix-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
}

.lee-memoria-regencia-label {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-soft);
  padding-top: 9px;
}

.lee-memoria-apps-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.lee-memoria-app-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 92px;
  max-width: 148px;
  padding: 9px 11px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(36, 37, 31, 0.08);
  background: var(--panel);
}

.lee-memoria-app-chip.is-live {
  border-color: rgba(63, 95, 76, 0.32);
  box-shadow: 0 0 0 3px rgba(63, 95, 76, 0.1);
}

.lee-memoria-app-chip.is-merged {
  border-style: dashed;
  border-color: rgba(36, 37, 31, 0.14);
}

.lee-memoria-app-chip.is-merged .lee-memoria-app-chip-meta {
  color: var(--ink-soft);
}

.lee-memoria-app-chip-name {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lee-memoria-app-chip-meta {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 10px;
  line-height: 1.3;
  color: var(--ink-faint);
}

.lee-memoria-item-when {
  margin: 8px 0 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  color: var(--ink-faint);
}

.lee-memoria-folder-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.lee-memoria-folder-summary {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lee-memoria-folder.is-open .lee-memoria-folder-summary {
  display: none;
}

.lee-memoria-folder--depth-0 .lee-memoria-folder-label {
  font-size: 14px;
}

.lee-memoria-folder--depth-1 {
  opacity: 0.88;
}

.lee-memoria-folder--depth-2 {
  opacity: 0.72;
}

.lee-memoria-folder--depth-3 {
  opacity: 0.58;
}

.lee-memoria-folder--depth-0::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(63, 95, 76, 0.12);
}

.lee-memoria-matrix-row + .lee-memoria-matrix-row {
  padding-top: 10px;
  border-top: 1px solid rgba(36, 37, 31, 0.06);
}

.lee-memoria-matrix-row[data-phase="curadoria"] .lee-memoria-regencia-label { color: #3d8f7a; }
.lee-memoria-matrix-row[data-phase="estruturar"] .lee-memoria-regencia-label { color: #4a7ab8; }
.lee-memoria-matrix-row[data-phase="executar"] .lee-memoria-regencia-label { color: #c47a2e; }
.lee-memoria-matrix-row[data-phase="recuperar"] .lee-memoria-regencia-label { color: #8b6fad; }
.lee-memoria-matrix-row[data-phase="overclock"] .lee-memoria-regencia-label { color: #6f6a9f; }

.lee-memoria-regencia-label {
  font-weight: 650;
}

/* —— Studio: gravidade no caminho ativo —— */
.config-studio-flow-viewport--live .config-cartas-flow-nodes .flow-node:not(.flow-node--live):not(.flow-node--live-lane) {
  opacity: 0.62;
  filter: grayscale(0.1);
  transition: opacity 0.22s ease, filter 0.22s ease;
}

.config-studio-flow-viewport--live .flow-node--locais {
  opacity: 0.72;
  filter: grayscale(0.06);
}

.config-studio-flow-viewport--live .flow-node--live {
  opacity: 1;
  filter: none;
  z-index: 2;
}

.config-studio-flow-viewport--live .flow-node--live.flow-node--regencia {
  box-shadow:
    0 6px 22px rgba(28, 42, 34, 0.09),
    0 0 0 1px rgba(63, 95, 76, 0.16);
}

.config-studio-flow-viewport--live .flow-node--live.flow-node--regencia .flow-node-kicker::after {
  content: ' · agora';
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.config-cartas-flow-edges .flow-edge--dim {
  stroke: rgba(63, 95, 76, 0.18);
  stroke-width: 1.75;
}

.config-cartas-flow-edges .flow-edge--live {
  stroke: rgba(63, 95, 76, 0.78);
  stroke-width: 2.5;
}

/* —— Airtrace: superfície de revisão —— */


@media (max-width: 720px) {
  :root {
    --lee-rail-w: 64px;
    --lee-shell-pad-x: 18px;
    --lee-shell-pad-y: 18px;
  }

  .lee-home-rail-label { font-size: 9px; }

  /* iOS Safari dá zoom automático ao focar campo com font-size < 16px. */
  input, textarea, select {
    font-size: 16px !important;
  }

  body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-body .intake-chips {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  body.atualizar-estado-wizard-open:not(.wizard-decisao) .wizard-body .intake-chips .chip {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
  }

  body.atualizar-estado-wizard-open:not(.wizard-decisao) .modal-layer {
    padding-top: calc(var(--lee-shell-top) + 48px) !important;
  }

  .lee-memoria-matrix-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .lee-memoria-regencia-label {
    padding-top: 0;
  }

  .regencia-surface__core {
    padding: 0 16px 32px;
    max-width: 100%;
  }

  .regencia-surface__hero {
    padding: 24px 0 20px;
  }

  .regencia-surface__bounds {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  body.wizard-decisao .wizard-body {
    overflow-y: auto;
  }

  body.wizard-decisao .wizard-nav {
    flex-direction: column-reverse;
    gap: 8px;
  }

  body.wizard-decisao .wizard-nav .btn {
    width: 100%;
  }

  .lee-workspace-topbar {
    flex-wrap: wrap;
  }
  .lee-workspace-mobile-tabs {
    display: flex !important;
    gap: 16px;
    width: 100%;
    order: 3;
    margin-top: 4px;
  }
  #lee-projeto-workspace[data-mobile-pane="main"] .lee-workspace-right {
    display: none;
  }
  #lee-projeto-workspace[data-mobile-pane="side"] .lee-task-list-shell {
    display: none;
  }
  #lee-projeto-workspace[data-mobile-pane="side"] .lee-workspace-right {
    width: 100%;
    border-left: none;
  }

  .lee-orq-header {
    padding: 10px 20px;
  }
  .lee-orq-mobile-sections,
  .lee-orq-header-controls {
    display: none !important;
  }
  .lee-orq-right,
  .lee-fw-right {
    display: none !important;
  }
}

/* ── Projeto Workspace ──────────────────────────────────────────────────────── */

.lee-projeto-workspace {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  z-index: 1;
}
.lee-projeto-workspace:not([hidden]) {
  display: flex;
}

/* Hide list view when workspace is open */
.lee-projetos-panel:has(.lee-projeto-workspace:not([hidden])) .lee-projetos-head,
.lee-projetos-panel:has(.lee-projeto-workspace:not([hidden])) .lee-projetos-scroll {
  display: none;
}

/* Top bar */
.lee-workspace-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--border);
}
.lee-workspace-topbar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.lee-workspace-back {
  font-size: 11px;
  color: var(--ink-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: system-ui, sans-serif;
}
.lee-workspace-back:hover { color: var(--ink-soft); }
.lee-workspace-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.lee-workspace-nome {
  font-family: var(--font);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}
.lee-workspace-desc {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 520px;
}
.lee-workspace-mobile-tabs {
  display: none;
}
.lee-workspace-mobile-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 4px 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lee-workspace-mobile-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
/* Body: kanban + right panel */
.lee-workspace-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* ── Kanban ─────────────────────────────────────────────────────────────────── */

.lee-kanban {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  gap: 0;
  padding: 20px 28px;
  overflow-x: auto;
  overflow-y: hidden;
}
.lee-kanban-col {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 10px;
  border-right: 1px solid var(--border);
}
.lee-kanban-col:first-child { padding-left: 0; }
.lee-kanban-col:last-child { border-right: none; padding-right: 0; }
.lee-kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lee-kanban-col-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
}
.lee-kanban-col-count {
  font-size: 10px;
  color: var(--ink-faint);
  background: rgba(0,0,0,0.035);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: system-ui, sans-serif;
}
.lee-kanban-col-cards {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding: 8px 2px 4px;
}
.lee-kanban-col-cards::-webkit-scrollbar { width: 3px; }
.lee-kanban-col-cards::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}
.lee-kanban-col-cards.drag-over {
  background: var(--accent-soft);
  border-radius: 6px;
  outline: 2px dashed var(--accent-line);
}
.lee-kanban-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  flex-shrink: 0;
  user-select: none;
}
.lee-kanban-card:hover { border-color: var(--border-strong); }
.lee-kanban-card.dragging { opacity: 0.45; }
.lee-kanban-card-title {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 5px;
  color: var(--ink);
  font-family: system-ui, sans-serif;
}
.lee-kanban-card-desc {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.4;
  margin: 0 0 7px;
  font-family: system-ui, sans-serif;
}
.lee-kanban-card-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.lee-card-tag {
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-faint);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 2px 5px;
  font-family: system-ui, sans-serif;
}
.lee-card-tag.agent {
  color: #5e5ce6;
  border-color: rgba(94,92,230,0.25);
  background: rgba(94,92,230,0.05);
}
.lee-card-tag.blocked {
  color: var(--danger);
  border-color: rgba(122,58,58,0.25);
  background: var(--danger-soft);
}
.lee-card-prio {
  font-size: 9px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 5px;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.1s;
}
.lee-card-prio:hover { opacity: 0.75; }
.lee-card-prio--alta  { color: #c0392b; background: rgba(192,57,43,0.08); border: 1px solid rgba(192,57,43,0.2); }
.lee-card-prio--media { color: #7a6500; background: rgba(180,150,0,0.08); border: 1px solid rgba(180,150,0,0.2); }
.lee-card-prio--baixa { color: var(--ink-faint); background: transparent; border: 1px solid rgba(0,0,0,0.12); }
.lee-prio-dropdown {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 90px;
}
.lee-prio-opt {
  font-size: 11px;
  font-weight: 500;
  font-family: system-ui, sans-serif;
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.lee-prio-opt:hover { background: var(--rail); }
.lee-prio-opt.active { font-weight: 700; }
.lee-prio-opt--alta  { color: #c0392b; }
.lee-prio-opt--media { color: #7a6500; }
.lee-prio-opt--baixa { color: var(--ink-faint); }
.lee-card-anexo-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
}
.lee-card-anexos-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  background: var(--rail);
  border-radius: 8px;
  margin-top: 4px;
}
.lee-card-anexos-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: system-ui, sans-serif;
}
.lee-card-anexo-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
}
.lee-card-anexo-nome {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lee-kanban-add-card {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 2px;
  font-size: 11px;
  color: var(--ink-faint);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  font-family: system-ui, sans-serif;
}
.lee-kanban-add-card:hover { color: var(--ink-soft); }

/* ── Task list ─────────────────────────────────────────────────────────────── */

.lee-task-list-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 28px;
  overflow: hidden;
}

.lee-task-list-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.lee-task-list-kicker {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lee-task-list-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink-soft);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.lee-task-list-add:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
}

.lee-task-list-table {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  border: 1px solid rgba(36, 37, 31, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.24);
  overflow: auto;
}

.lee-task-list-header,
.lee-task-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 118px 96px;
  gap: 12px;
  align-items: center;
}

.lee-task-list-header {
  min-height: 36px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.08);
  color: var(--ink-faint);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(236, 234, 229, 0.42);
}

.lee-task-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  min-width: 558px;
}

.lee-task-list-empty {
  padding: 18px;
  color: var(--ink-faint);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
}

.lee-task-row {
  min-height: 58px;
  padding: 10px 14px 10px 16px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.065);
  cursor: pointer;
  transition: background 0.12s ease;
}

.lee-task-row:last-child {
  border-bottom: none;
}

.lee-task-row:hover {
  background: rgba(255, 255, 255, 0.44);
}

.lee-task-row--done .lee-task-title {
  color: var(--ink-soft);
}

.lee-task-row--done .lee-task-done {
  border-color: rgba(63, 95, 76, 0.42);
  background: rgba(63, 95, 76, 0.16);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.62);
}

.lee-task-row--agent-focus {
  position: relative;
  background:
    linear-gradient(90deg, rgba(50, 151, 214, 0.09), rgba(255, 255, 255, 0.22) 42%),
    rgba(255, 255, 255, 0.34);
}

.lee-task-row--agent-focus::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: rgba(50, 151, 214, 0.62);
}

.lee-task-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.lee-task-done {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 2px;
  border: 1.5px solid rgba(36, 37, 31, 0.22);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.lee-task-done:hover {
  border-color: var(--accent);
  background: rgba(63, 95, 76, 0.08);
}

.lee-task-copy {
  min-width: 0;
}

.lee-task-agent-pointer {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0 0;
  color: rgba(36, 103, 145, 0.88);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.lee-task-agent-live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(50, 151, 214, 0.92);
  box-shadow: 0 0 0 0 rgba(50, 151, 214, 0.34);
  animation: leeAgentLivePulse 1.45s ease-out infinite;
}

@keyframes leeAgentLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(50, 151, 214, 0.36); }
  70% { box-shadow: 0 0 0 6px rgba(50, 151, 214, 0); }
  100% { box-shadow: 0 0 0 0 rgba(50, 151, 214, 0); }
}

.lee-task-title {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lee-task-desc {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lee-task-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.lee-task-agent-queue {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(50, 151, 214, 0.16);
  background: rgba(50, 151, 214, 0.055);
  color: rgba(36, 103, 145, 0.78);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.lee-task-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(36, 37, 31, 0.1);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.lee-task-status {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.44);
  color: var(--ink-soft);
}

.lee-task-status::after,
.lee-task-row > .lee-card-prio::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: -2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  flex: 0 0 auto;
}

.lee-task-row > .lee-card-prio {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  max-width: max-content;
  min-height: 24px;
  padding: 0 8px 0 10px;
  border-radius: 7px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.lee-task-status--em_progresso {
  color: var(--accent);
  background: rgba(63, 95, 76, 0.08);
  border-color: rgba(63, 95, 76, 0.16);
}

.lee-task-status--bloqueado {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(122, 58, 58, 0.2);
}

.lee-task-status--feito {
  color: var(--ink-faint);
  background: rgba(36, 37, 31, 0.04);
}

.lee-status-dropdown {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 118px;
}

.lee-status-opt {
  font-size: 11px;
  font-weight: 500;
  font-family: system-ui, sans-serif;
  padding: 6px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.lee-status-opt:hover { background: var(--rail); }
.lee-status-opt.active { font-weight: 700; }

/* Task detail modal — ClickUp-style */
.lee-task-detail-modal {
  width: min(860px, calc(100vw - 42px));
  max-width: min(860px, calc(100vw - 42px));
  max-height: min(82vh, 720px);
  border-radius: 14px;
  /* NOTE: no display:flex here — inherited from .lee-projeto-edit-modal.open */
}

.lee-task-detail-head {
  padding: 14px 24px 12px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.08);
  flex-shrink: 0;
}

.lee-task-detail-head h3 {
  margin: 0;
  color: var(--ink-faint);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Body becomes a single scrollable column */
.lee-task-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 48px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lee-task-detail-title-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  outline: none;
  padding: 0 0 18px;
}

.lee-task-detail-title-input::placeholder {
  color: var(--ink-faint);
}

/* Properties table — rows like ClickUp */
.lee-task-detail-props {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 18px;
  border-top: 1px solid rgba(36, 37, 31, 0.07);
  border-bottom: 1px solid rgba(36, 37, 31, 0.07);
  margin-bottom: 20px;
}

.lee-task-detail-prop-row {
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 0;
}

.lee-task-detail-prop-label {
  width: 160px;
  flex-shrink: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: var(--ink-faint);
  font-weight: 500;
}

.lee-task-detail-prop-value select {
  border: 1px solid transparent;
  background-color: transparent;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  padding: 5px 30px 5px 8px;
  border-radius: 7px;
}

.lee-task-detail-prop-value select:hover {
  background: rgba(36, 37, 31, 0.05);
  border-color: rgba(36, 37, 31, 0.08);
}

/* Description area */
.lee-task-detail-desc-label {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 6px;
}

.lee-task-detail-desc {
  width: 100%;
  min-height: 200px;
  flex: 1;
  resize: none;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14.5px;
  line-height: 1.7;
  outline: none;
}

.lee-task-detail-desc::placeholder {
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  .lee-task-detail-body { padding: 18px 20px 16px; }
  .lee-task-detail-title-input { font-size: 20px; }
  .lee-task-detail-prop-label { width: 110px; }
}

/* ── Right panel ────────────────────────────────────────────────────────────── */

.lee-workspace-right {
  width: 250px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  background: var(--bg);
}
.lee-workspace-right::-webkit-scrollbar { width: 3px; }
.lee-workspace-right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.lee-workspace-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.lee-workspace-section:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.lee-workspace-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lee-workspace-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  font-family: system-ui, sans-serif;
}
.lee-panel-add {
  font-size: 11px;
  color: var(--ink-faint);
  border: none;
  background: none;
  cursor: pointer;
  font-family: system-ui, sans-serif;
}
.lee-panel-add:hover { color: var(--ink-soft); }

/* Contexto list */
.lee-workspace-contexto-list,
.lee-workspace-impedimentos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lee-workspace-contexto-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  line-height: 1.4;
}
.lee-workspace-contexto-item svg { flex-shrink: 0; margin-top: 2px; color: var(--ink-faint); }
.lee-workspace-contexto-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lee-workspace-contexto-remove {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-ghost);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  padding: 0 2px;
}
.lee-workspace-contexto-remove:hover { color: var(--danger); }
.lee-workspace-contexto-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px dashed rgba(36, 37, 31, 0.18);
  border-radius: 8px;
  color: var(--ink-faint);
  font-size: 12px;
  font-family: system-ui, sans-serif;
}
.lee-contexto-empty-generate {
  align-self: flex-start;
  border: 1px solid rgba(36, 37, 31, 0.18);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.lee-contexto-empty-generate:hover { background: var(--rail); color: var(--ink); }

/* Impedimentos list */
.lee-workspace-impedimento-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  cursor: pointer;
}
.lee-workspace-impedimento-item.resolvido .lee-impedimento-texto {
  text-decoration: line-through;
  color: var(--ink-ghost);
}
.lee-impedimento-tipo-agente {
  font-size: 9px;
  font-weight: 600;
  color: #5e5ce6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 3px;
  flex-shrink: 0;
}

/* Agente config */
.lee-agente-prompt-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  font-style: italic;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  resize: vertical;
  line-height: 1.5;
}
.lee-agente-prompt-input:focus { border-color: var(--border-strong); outline: none; }

/* ── Chat FAB ───────────────────────────────────────────────────────────────── */

.lee-chat-fab {
  position: absolute;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 100;
  color: #fff;
}
.lee-chat-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* ── Chat popup ─────────────────────────────────────────────────────────────── */

.lee-chat-popup {
  position: absolute;
  bottom: 88px;
  right: 28px;
  width: 410px;
  height: 420px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.lee-chat-popup.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.lee-chat-popup-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.lee-chat-popup-head-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.lee-chat-popup-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  overflow-wrap: break-word;
}
.lee-chat-popup-subtitle {
  font-size: 10px;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
}
.lee-chat-popup-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}
.lee-chat-ctrl-btn {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-faint);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.lee-chat-ctrl-btn:hover { background: var(--rail); color: var(--ink); }

/* Minimizado: só o header visível, popup ancorando no bottom-right */
.lee-chat-popup.minimized {
  height: auto;
  bottom: 88px;
}
.lee-chat-popup.minimized .lee-chat-messages,
.lee-chat-popup.minimized .lee-chat-budget-warn,
.lee-chat-popup.minimized .lee-chat-input-row { display: none !important; }
.lee-chat-popup.minimized .lee-chat-popup-head { border-bottom: none; }

/* Maximizado */
.lee-chat-popup.maximized {
  width: 520px;
  height: 560px;
}
.lee-chat-popup.maximized .lee-chat-messages {
  font-size: 13px;
}
.lee-chat-popup.maximized .lee-chat-bubble {
  font-size: 13px;
}
.lee-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lee-chat-messages::-webkit-scrollbar { width: 3px; }
.lee-chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.lee-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 85%;
}
.lee-chat-msg.agent,
.lee-chat-msg.orquestrador,
.lee-chat-msg.agente { align-self: flex-start; }
.lee-chat-msg.user { align-self: flex-end; }
.lee-chat-bubble {
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  font-family: system-ui, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}
.lee-chat-msg.orquestrador .lee-chat-bubble {
  background: var(--ink);
  color: #fff;
  border-bottom-left-radius: 4px;
}
.lee-chat-msg.agente .lee-chat-bubble {
  background: var(--rail);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.lee-chat-msg.user .lee-chat-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.lee-chat-msg-author {
  font-size: 10px;
  color: var(--ink);
  font-weight: 600;
  padding: 0 12px;
  margin-bottom: 2px;
  align-self: flex-start;
  text-align: left;
  letter-spacing: 0.02em;
}
.lee-chat-msg-time {
  font-size: 9px;
  color: var(--ink-faint);
  padding: 0 4px;
  font-family: system-ui, sans-serif;
}
.lee-chat-msg.user .lee-chat-msg-time { text-align: right; }
.lee-msg-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0 2px;
}
.lee-chat-msg:hover .lee-msg-actions { opacity: 1; }
.lee-chat-msg.user .lee-msg-actions { justify-content: flex-end; }
.lee-msg-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}
.lee-msg-action-btn:hover { background: var(--rail); color: var(--ink); }
.lee-chat-msg-actions {
  display: flex;
  gap: 6px;
  padding: 4px 0;
}
.lee-chat-budget-warn {
  padding: 8px 16px;
  background: var(--danger-soft);
  border-top: 1px solid rgba(122,58,58,0.15);
  font-size: 11px;
  color: var(--danger);
  font-family: system-ui, sans-serif;
  line-height: 1.4;
}
.lee-chat-input-row {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.lee-chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  resize: none;
  overflow-y: hidden;
  line-height: 1.4;
  min-height: 34px;
  max-height: 160px;
}
.lee-chat-input:focus { border-color: var(--border-strong); }
.lee-chat-send {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  transition: opacity 0.12s;
}
.lee-chat-send:hover { opacity: 0.8; }

/* ── Chat: pending action bubble ──────────────────────────────────────────── */
.lee-chat-pending-action {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f0f7ff;
  border: 1px solid #b8d4f5;
}
.lee-chat-pa-label {
  flex: 1;
  font-size: 12px;
  color: #1a4a80;
}
.lee-chat-pa-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 260px;
}
.lee-chat-pa-btn {
  flex-shrink: 0;
  background: #fff;
  color: #1a4a80;
  border: 1px solid #b8d4f5;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.lee-chat-pa-btn.primary {
  background: #1a4a80;
  color: #fff;
  border: none;
}
.lee-chat-pa-btn.danger {
  color: #9f2d2d;
  border-color: #e3b8b8;
}
.lee-chat-pa-btn:hover { opacity: 0.85; }
.lee-chat-pa-btn:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 720px) {
  .lee-chat-pending-action { flex-direction: column; }
  .lee-chat-pa-actions { justify-content: flex-start; max-width: 100%; }
}
/* Formulário seguro de login — senha vai direto pro cofre, não pro chat/modelo. */
.lee-chat-credential-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f4f9f4;
  border: 1px solid #bfe0c2;
  max-width: 320px;
}
.lee-cred-title {
  font-size: 12px;
  font-weight: 700;
  color: #1f5e34;
}
.lee-cred-hint {
  font-size: 11px;
  color: #4a7a56;
  margin-top: -2px;
}
.lee-cred-user,
.lee-cred-pass {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bfe0c2;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 16px; /* evita zoom automático no iOS */
  color: var(--ink, #1a1a1a);
  background: #fff;
  outline: none;
}
.lee-cred-user:focus,
.lee-cred-pass:focus { border-color: #1f5e34; }
.lee-cred-actions {
  display: flex;
  justify-content: flex-end;
}
.lee-cred-save {
  background: #1f5e34;
  color: #fff;
  border: none;
}
.lee-cred-status {
  font-size: 11px;
  color: #9f2d2d;
  min-height: 0;
}
.lee-chat-send:disabled { opacity: 0.4; cursor: default; }
.lee-chat-motivo { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-2, #f5f5f5); border-radius: 8px; }
.lee-chat-motivo-input { flex: 1; border: none; background: transparent; font-size: 12px; color: var(--ink, #1a1a1a); outline: none; min-width: 0; }
.lee-chat-motivo-input::placeholder { color: var(--ink-faint, #aaa); }
.lee-chat-motivo-skip { border: none; background: none; font-size: 11px; color: var(--ink-faint, #aaa); cursor: pointer; padding: 0; white-space: nowrap; }
.lee-chat-motivo-skip:hover { color: var(--ink, #1a1a1a); }
.lee-chat-motivo-send {
  border: none;
  border-radius: 6px;
  background: #1a4a80;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.lee-chat-motivo-required .lee-chat-motivo {
  box-shadow: 0 0 0 1px rgba(159,45,45,0.28);
}
.lee-chat-eval-draft {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 680px;
}
.lee-chat-eval-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.lee-chat-eval-original,
.lee-chat-eval-note {
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.35;
}
.lee-chat-eval-original span {
  color: var(--ink);
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.lee-chat-eval-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lee-chat-eval-field span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}
.lee-chat-eval-field textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  font: 12px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif;
  padding: 8px 9px;
  outline: none;
}
.lee-chat-eval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lee-chat-eval-actions button {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 9px;
}
.lee-chat-eval-actions button.ghost {
  color: var(--ink-faint);
}
.lee-chat-eval-draft.saved {
  background: rgba(63, 95, 76, 0.08);
}

/* ── Chat: thinking animation ───────────────────────────────────────────────── */
@keyframes lee-thinking-dot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.lee-chat-thinking {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lee-chat-thinking span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-soft);
  animation: lee-thinking-dot 1.2s ease infinite;
}
.lee-chat-thinking span:nth-child(2) { animation-delay: 0.2s; }
.lee-chat-thinking span:nth-child(3) { animation-delay: 0.4s; }
.lee-chat-thinking em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-faint);
  margin-left: 2px;
}

/* ── Chat: markdown rendering ───────────────────────────────────────────────── */
.lee-chat-bubble { white-space: normal; }
.lee-chat-bubble p { margin: 0 0 6px; }
.lee-chat-bubble p:last-child { margin-bottom: 0; }
.lee-chat-bubble strong { font-weight: 600; }
.lee-chat-bubble em { font-style: italic; }
.lee-chat-bubble .lee-chat-h {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin: 6px 0 2px;
}
.lee-chat-bubble .lee-chat-ul {
  margin: 4px 0;
  padding-left: 16px;
}
.lee-chat-bubble .lee-chat-ul li { margin-bottom: 2px; }
.lee-chat-bubble .lee-chat-pre {
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 6px 0;
  overflow-x: auto;
  font-size: 11px;
  font-family: 'SF Mono', monospace;
  white-space: pre;
}
.lee-chat-bubble .lee-chat-code {
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 11px;
  font-family: 'SF Mono', monospace;
}
.lee-chat-msg.user .lee-chat-bubble .lee-chat-pre,
.lee-chat-msg.user .lee-chat-bubble .lee-chat-code {
  background: rgba(255,255,255,0.15);
}

/* ── Chat: error + retry ────────────────────────────────────────────────────── */
.lee-chat-error {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(122,58,58,0.2) !important;
  color: var(--danger) !important;
  background: var(--danger-soft) !important;
  font-size: 11px;
}
.lee-chat-retry-btn {
  align-self: flex-start;
  background: none;
  border: 1px solid rgba(122,58,58,0.35);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--danger);
  cursor: pointer;
  font-family: system-ui, sans-serif;
  transition: background 0.12s;
}
.lee-chat-retry-btn:hover { background: rgba(122,58,58,0.08); }

/* ── Vault credential modal ─────────────────────────────────────────────────── */
.lee-vault-modal {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(2px);
}
.lee-vault-modal[hidden] { display: none; }
.lee-vault-box {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 24px 28px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.lee-vault-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  margin-bottom: 2px;
}
.lee-vault-site {
  font-size: 12px;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 6px 10px;
  background: var(--rail);
  border-radius: 6px;
  font-weight: 500;
}
.lee-vault-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: -4px;
}
.lee-vault-input {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 1px 0 rgba(255,255,255,0.85) inset, 0 8px 20px rgba(24, 26, 21, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.lee-vault-input:focus {
  border-color: rgba(49, 123, 82, 0.5);
  box-shadow: 0 0 0 3px rgba(49, 123, 82, 0.14), 0 1px 0 rgba(255,255,255,0.88) inset;
  background: rgba(255, 255, 255, 0.98);
}
.lee-vault-note {
  font-size: 10px;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lee-vault-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}
.lee-vault-cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: system-ui, sans-serif;
}
.lee-vault-save {
  background: var(--ink);
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-weight: 500;
}
.lee-vault-save:hover { opacity: 0.85; }

/* ── Browser screenshot in chat ─────────────────────────────────────────────── */
.lee-chat-screenshot-bubble {
  padding: 4px !important;
  background: var(--rail) !important;
}
.lee-chat-screenshot {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  display: block;
  cursor: zoom-in;
}

/* ── Projects head actions ──────────────────────────────────────────────────── */
.lee-projetos-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lee-projetos-trash-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-ghost, var(--ink-faint));
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}
.lee-projetos-trash-btn:hover {
  background: var(--rail);
  color: var(--ink-soft);
}

/* ── Workspace 3-dot menu ───────────────────────────────────────────────────── */
.lee-workspace-menu {
  position: relative;
  flex-shrink: 0;
}
.lee-workspace-menu-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  font-size: 16px;
  color: var(--ink-faint);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.lee-workspace-menu-btn:hover {
  background: var(--rail);
  color: var(--ink-soft);
}
.lee-workspace-menu-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 200;
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.lee-workspace-menu-dropdown[hidden] { display: none; }
.lee-workspace-menu-item {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.1s;
}
.lee-workspace-menu-item:hover { background: var(--rail); }
.lee-workspace-menu-item.danger { color: var(--danger); }
.lee-workspace-menu-item.danger:hover { background: var(--danger-soft); }

/* ── Trash modal ────────────────────────────────────────────────────────────── */
.lee-trash-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lee-trash-modal[hidden] { display: none; }
.lee-trash-box {
  background: var(--bg);
  border-radius: 14px;
  width: 400px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
}
.lee-trash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.lee-trash-head h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  font-family: system-ui, sans-serif;
}
.lee-trash-list {
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lee-trash-empty {
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
  padding: 24px 0;
  font-family: system-ui, sans-serif;
}
.lee-trash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-radius: 8px;
  gap: 8px;
}
.lee-trash-item:hover { background: var(--rail); }
.lee-trash-item-nome {
  font-size: 13px;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lee-trash-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.lee-trash-restore {
  min-height: 30px;
  font-size: 11px;
  border-color: var(--border-strong);
  padding: 4px 10px;
}
.lee-trash-restore:hover { background: var(--rail); }
.lee-trash-purge {
  min-height: 30px;
  font-size: 11px;
  border-color: rgba(122,58,58,0.25);
  padding: 4px 10px;
}
.lee-trash-purge:hover { background: var(--danger-soft); }

/* ── Contexto options popover ───────────────────────────────────────────────── */
.lee-contexto-opcoes-pop {
  position: fixed;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 4px;
  display: flex;
  flex-direction: column;
  z-index: 300;
  width: min(180px, calc(100vw - 16px));
}
.lee-contexto-opcoes-pop[hidden] { display: none; }
.lee-ctx-op-btn {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 7px;
}
.lee-ctx-op-btn:hover { background: var(--rail); }

/* ── Mini input modal ───────────────────────────────────────────────────────── */
.lee-mini-input-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lee-mini-input-modal[hidden] { display: none; }
.lee-mini-input-box {
  background: var(--bg);
  border-radius: 14px;
  width: 340px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.16);
}
.lee-mini-input-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-family: system-ui, sans-serif;
}
.lee-mini-input-field {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  outline: none;
  box-sizing: border-box;
}
.lee-mini-input-field:focus { border-color: var(--ink-faint); }
.lee-mini-input-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Hunter contexto modal ─────────────────────────────────────────────── */
.lee-contexto-hunter-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.34);
  z-index: 705;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.lee-contexto-hunter-modal[hidden] { display: none; }
.lee-contexto-hunter-box {
  width: min(620px, 100%);
  max-height: 86vh;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lee-contexto-hunter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(36, 37, 31, 0.08);
}
.lee-contexto-hunter-head h3 {
  margin: 0;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.lee-contexto-hunter-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lee-contexto-hunter-questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}
.lee-contexto-hunter-questions li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px;
}
.lee-contexto-hunter-questions span {
  color: var(--ink-faint);
  font-weight: 600;
}
.lee-contexto-hunter-textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
  font-size: 13px;
  line-height: 1.5;
  font-family: system-ui, sans-serif;
}
.lee-contexto-hunter-textarea:focus { border-color: var(--ink-faint); }
.lee-contexto-hunter-status {
  min-height: 16px;
  color: var(--ink-faint);
  font-size: 12px;
  font-family: system-ui, sans-serif;
}
.lee-contexto-hunter-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(36, 37, 31, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ORQUESTRAÇÃO
   ═══════════════════════════════════════════════════════════════════════════ */
.lee-orquestracao-panel {
  display: none;
  flex-direction: column;
  position: fixed;
  left: var(--lee-rail-w, 76px);
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 175;
  background: var(--bg);
  overflow: hidden;
}
body.lee-shell-orquestracao .lee-orquestracao-panel { display: flex; }
/* ─── Orquestração: feed de atividade ─────────────────────────────────────── */
.lee-orq-header {
  flex-shrink: 0;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}
/* ── Tabs ── */
.lee-orq-tabs {
  display: flex;
  gap: 0;
  align-items: stretch;
  height: 52px;
}
.lee-orq-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 18px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lee-orq-tab:hover { color: var(--ink); }
.lee-orq-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.lee-orq-mobile-sections {
  display: none;
}
.lee-orq-mobile-sections-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 4px 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lee-orq-mobile-sections-btn.active { color: var(--ink); border-bottom-color: var(--ink); }
/* ── Flywheel / Distilação ── */
.lee-fw-main {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  font-family: system-ui, sans-serif;
}
.lee-fw-main[hidden], .lee-orq-main[hidden] { display: none !important; }
.lee-fw-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.lee-fw-left-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.lee-fw-proj-select {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.92);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(36, 37, 31, 0.56) 50%),
    linear-gradient(135deg, rgba(36, 37, 31, 0.56) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 1px),
    calc(100% - 12px) calc(50% - 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  border: 1px solid rgba(36, 37, 31, 0.14);
  border-radius: 10px;
  padding: 9px 36px 9px 12px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.88) inset, 0 10px 20px rgba(24, 26, 21, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.lee-fw-proj-select:focus {
  outline: none;
  border-color: rgba(49, 123, 82, 0.45);
  box-shadow: 0 0 0 3px rgba(49, 123, 82, 0.12), 0 1px 0 rgba(255,255,255,0.88) inset;
  background-color: rgba(255, 255, 255, 0.98);
}
.lee-fw-window {
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
}
.lee-fw-grupos {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lee-fw-empty, .lee-fw-loading {
  font-size: 12px;
  color: var(--ink-faint);
  padding: 8px 0;
}
.lee-fw-grupo { display: flex; flex-direction: column; gap: 8px; }
.lee-fw-grupo-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.lee-fw-grupo-tipo {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.lee-fw-grupo-count { font-size: 11px; color: var(--ink-faint); }
.lee-fw-eval-lista { display: flex; flex-direction: column; gap: 6px; }
.lee-fw-eval-item {
  background: var(--surface-2, #f8f8f8);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lee-fw-eval-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.lee-fw-review-result {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
}
.lee-fw-review-result--raso { background: #f5e9c5; color: #7a5f10; }
.lee-fw-review-result--alucinou { background: #fde0e0; color: #8b2020; }
.lee-fw-review-result--ajustar { background: #e0e8fd; color: #1a3a8b; }
.lee-fw-data { font-size: 11px; color: var(--ink-faint); }
.lee-fw-resumo { font-size: 12px; color: var(--ink); }
.lee-fw-motivo { font-size: 11px; color: var(--ink-faint); }
.lee-fw-motivo--sem { font-style: italic; }
.lee-fw-motivo-label { font-weight: 600; color: var(--ink); }
.lee-fw-traducao {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}
.lee-fw-traducao span {
  color: var(--ink);
  font-weight: 600;
}
.lee-fw-traducao-status {
  color: var(--ink-faint);
  font-size: 10px;
}
/* right pane */
.lee-fw-right {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lee-fw-right-header {
  flex-shrink: 0;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lee-fw-right-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.lee-fw-proj-nome { font-size: 13px; color: var(--ink); font-weight: 500; }
.lee-fw-hermes {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  max-height: 42%;
  overflow-y: auto;
}
.lee-fw-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lee-fw-candidates,
.lee-fw-principles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lee-fw-hermes-item,
.lee-fw-principle-item {
  border: 1px solid var(--border);
  background: var(--surface-2, #f8f8f8);
  border-radius: 8px;
  padding: 9px 10px;
}
.lee-fw-hermes-text,
.lee-fw-principle-item {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink);
}
.lee-fw-hermes-case {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-faint);
}
.lee-fw-hermes-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.lee-fw-hermes-actions button {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  font-size: 11px;
  font-family: var(--font);
  padding: 5px 8px;
  cursor: pointer;
}
.lee-fw-hermes-actions button.ghost {
  background: transparent;
  color: var(--ink-faint);
}
.lee-fw-hermes-actions button:disabled { opacity: 0.5; cursor: default; }
.lee-fw-prompt-editor {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
  padding: 16px 20px;
}
.lee-fw-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
}
.lee-fw-saved-msg { font-size: 11px; color: var(--ink-faint); }
.lee-fw-save-btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
}
.lee-fw-save-btn:hover { opacity: 0.85; }
.lee-fw-save-btn:disabled { opacity: 0.4; cursor: default; }
.lee-orq-title {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}
.lee-orq-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lee-orq-model-select {
  font-size: 11px;
  color: var(--ink-soft);
  background-color: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 28px 4px 8px;
  cursor: pointer;
  outline: none;
  height: 28px;
}
.lee-orq-model-select:focus { border-color: var(--accent); }
.lee-orq-refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.lee-orq-refresh-btn:hover { background: var(--rail); color: var(--ink-soft); }
.lee-orq-reset-btn {
  font-size: 10px;
  font-weight: 500;
  font-family: system-ui, sans-serif;
  padding: 4px 9px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.lee-orq-reset-btn:hover { background: rgba(180,50,50,0.06); color: #b43232; border-color: rgba(180,50,50,0.2); }
.lee-orq-reset-btn:disabled { opacity: 0.5; cursor: default; }
.lee-orq-main {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.lee-orq-right {
  width: 196px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lee-orq-right-top {
  flex-shrink: 0;
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}
.lee-orq-proj-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 10px 0;
  overflow: hidden;
}
.lee-orq-proj-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-content: start;
  padding-bottom: 12px;
}
.lee-orq-proj-list::-webkit-scrollbar { width: 3px; }
.lee-orq-proj-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.lee-orq-proj-card {
  aspect-ratio: 1 / 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface, rgba(255,255,255,0.5));
  display: flex;
  flex-direction: column;
  cursor: default;
  transition: background 0.12s;
  min-width: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.lee-orq-proj-card:hover { background: rgba(36,37,31,0.03); }
.lee-orq-proj-card-nome {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}
.lee-orq-proj-card-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lee-orq-proj-card-stat {
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lee-orq-proj-card-stat span {
  color: var(--ink-soft);
  font-weight: 600;
}
.lee-orq-right-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}
.lee-orq-right-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.lee-orq-right-item:last-child { border-bottom: none; }
.lee-orq-right-val {
  font-weight: 600;
  color: var(--ink);
}
.lee-orq-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lee-orq-feed::-webkit-scrollbar { width: 3px; }
.lee-orq-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
/* Empty state */
.lee-orq-empty {
  padding: 48px 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
  line-height: 1.7;
}
/* Feed item */
.lee-orq-item {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-family: system-ui, sans-serif;
}
.lee-orq-item:last-child { border-bottom: none; }
.lee-orq-item-stripe {
  width: 3px;
  flex-shrink: 0;
  border-radius: 2px;
  margin-top: 3px;
  align-self: stretch;
  min-height: 14px;
}
.lee-orq-item.tipo-agente .lee-orq-item-stripe        { background: var(--accent); }
.lee-orq-item.tipo-orquestrador .lee-orq-item-stripe  { background: var(--ink-soft); }
.lee-orq-item.tipo-sistema .lee-orq-item-stripe       { background: var(--warn, #8a6a2a); }
.lee-orq-item.tipo-usuario .lee-orq-item-stripe       { background: var(--border-strong); }
.lee-orq-item-body { flex: 1; min-width: 0; }
.lee-orq-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.lee-orq-item-tipo {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
}
.lee-orq-item.tipo-agente .lee-orq-item-tipo        { color: var(--accent); }
.lee-orq-item.tipo-orquestrador .lee-orq-item-tipo  { color: var(--ink-soft); }
.lee-orq-item.tipo-usuario .lee-orq-item-tipo       { color: var(--ink-faint); }
.lee-orq-item-proj {
  font-size: 10px;
  color: var(--ink-faint);
  background: var(--rail);
  border-radius: 4px;
  padding: 1px 6px;
}
.lee-orq-item-time {
  font-size: 10px;
  color: var(--ink-faint);
  margin-left: auto;
  white-space: nowrap;
}
.lee-orq-item-content {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
/* Reply button on agent messages */
.lee-orq-reply-btn {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  opacity: 0.7;
  transition: opacity 0.12s;
}
.lee-orq-reply-btn:hover { opacity: 1; }
/* Inline reply form */
.lee-orq-reply-form {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  align-items: flex-end;
}
.lee-orq-reply-input {
  flex: 1;
  font-size: 12px;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--panel, #fff);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 10px;
  resize: none;
  outline: none;
  line-height: 1.4;
  min-height: 34px;
  max-height: 120px;
  transition: border-color 0.12s;
}
.lee-orq-reply-input:focus { border-color: var(--accent); }
.lee-orq-reply-send {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  transition: opacity 0.12s;
  white-space: nowrap;
}
.lee-orq-reply-send:hover { opacity: 0.85; }
.lee-orq-reply-send:disabled { opacity: 0.5; cursor: default; }

/* Agent message cards (reference design) */
.lee-orq-msg-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(236, 234, 229, 0.42)),
    rgba(246, 244, 238, 0.62);
  border: 1px solid rgba(36, 37, 31, 0.08);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(36, 37, 31, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.lee-orq-msg-card:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(236, 234, 229, 0.48)),
    rgba(246, 244, 238, 0.7);
  box-shadow: 0 14px 34px rgba(36, 37, 31, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.68);
  border-color: rgba(36, 37, 31, 0.13);
}
.lee-orq-msg-from {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lee-orq-msg-from-left { display: flex; align-items: center; gap: 10px; }
.lee-orq-agent-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rail);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.lee-orq-msg-proj {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  text-align: left;
}
.lee-orq-msg-task {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 1px;
  line-height: 1.3;
  text-align: left;
}
.lee-orq-msg-time {
  font-size: 10px;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.lee-orq-msg-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.lee-orq-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}
.lee-orq-msg-body {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.65;
  text-align: left;
}
.lee-orq-msg-sender {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
}
.lee-orq-msg-body p { margin: 0 0 6px; text-align: left; }
.lee-orq-msg-body p:last-child { margin-bottom: 0; }
.lee-orq-msg-body .lee-chat-ul { margin: 4px 0 8px; padding-left: 18px; }
.lee-orq-msg-body .lee-chat-ul li { margin-bottom: 3px; }
.lee-orq-msg-body .lee-chat-h { display: block; font-weight: 600; margin: 10px 0 2px; color: var(--ink); }
.lee-orq-msg-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.lee-orq-msg-actions-left { display: flex; gap: 6px; }
.lee-orq-msg-actions-right { display: flex; gap: 12px; align-items: center; }
.lee-orq-action-btn {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: none;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  transition: background 0.12s;
}
.lee-orq-action-btn:hover { background: var(--rail); }
.lee-orq-action-btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.lee-orq-action-btn.primary:hover { opacity: 0.82; }
.lee-orq-view-link {
  font-size: 10px;
  color: var(--ink-faint);
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: system-ui, sans-serif;
}
.lee-orq-view-link:hover { color: var(--ink-soft); }

/* Card agent button */
.lee-card-agent-row {
  padding: 8px 20px 0;
}
.lee-card-agent-btn {
  font-size: 12px;
  color: var(--accent);
  border-color: var(--accent);
}
.lee-card-dispatch-btn {
  font-size: 12px;
  margin-left: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: system-ui, sans-serif;
}
.lee-card-dispatch-btn:hover { opacity: 0.85; }

/* Orq Chat Modal */
.lee-orq-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 29, 24, 0.42);
  backdrop-filter: blur(5px);
  z-index: 500;
}
.lee-orq-chat-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(760px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 56px));
  max-height: 86vh;
  background: var(--bg);
  z-index: 501;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(36, 37, 31, 0.12);
  border-radius: 20px;
  box-shadow: 0 28px 90px rgba(28, 29, 24, 0.24), 0 1px 0 rgba(255,255,255,0.8) inset;
  transform: translate(-50%, -50%);
}
.lee-orq-chat-head {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  min-height: 0;
  padding: 0;
  border-bottom: none;
  flex-shrink: 0;
  background: transparent;
  z-index: 3;
  pointer-events: none;
}
.lee-orq-chat-proj {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.lee-orq-chat-titulo {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.lee-orq-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lee-orq-chat-loading {
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 20px;
}
.lee-orq-chat-bubble {
  max-width: 78%;
  padding: 11px 14px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.58;
  word-break: break-word;
  text-align: left;
}
.lee-orq-chat-bubble p { margin: 0 0 6px; }
.lee-orq-chat-bubble p:last-child { margin-bottom: 0; }
.lee-orq-chat-bubble.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.lee-orq-chat-bubble.agent {
  align-self: flex-start;
  background: var(--rail);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.lee-orq-chat-head-left {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  width: max-content;
  max-width: calc(100% - 44px);
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: auto;
}
.lee-orq-chat-head-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.lee-orq-chat-menu-btn {
  font-size: 18px;
  color: var(--ink-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
}
.lee-orq-chat-menu-btn:hover { background: var(--rail); color: var(--ink); }
.lee-orq-chat-dropdown {
  position: absolute;
  top: 52px;
  right: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 10;
  min-width: 160px;
  overflow: hidden;
}
.lee-orq-chat-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
}
.lee-orq-chat-dropdown button:hover { background: var(--rail); }
.lee-orq-chat-dropdown button.danger { color: #c0392b; }
.lee-orq-chat-foot {
  flex-shrink: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: rgba(255,255,255,0.72);
}
.lee-orq-chat-input {
  flex: 1;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--rail);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  resize: none;
  outline: none;
  line-height: 1.4;
  min-height: 38px;
  max-height: 120px;
  transition: border-color 0.12s;
}
.lee-orq-chat-input:focus { border-color: var(--accent); background: var(--bg); }
.lee-orq-chat-send { flex-shrink: 0; }

.lee-orq-chat-modal .lee-chat-popup-title {
  font-size: 15px;
  font-weight: 620;
  line-height: 1.35;
}

.lee-orq-chat-modal .lee-chat-popup-subtitle {
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1;
}

.lee-orq-chat-modal .lee-chat-popup-controls {
  display: none;
}

.lee-orq-chat-task-card {
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid rgba(36, 37, 31, 0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 24px rgba(36, 37, 31, 0.1), 0 1px 0 rgba(255,255,255,0.82) inset;
  display: block;
}

.lee-orq-chat-task-row {
  display: grid;
  grid-template-columns: 28px max-content 1px minmax(0, auto) 28px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 100%;
}

.lee-orq-chat-reset-inside {
  width: 26px;
  height: 26px;
  color: var(--ink-faint);
}

.lee-orq-chat-back {
  display: none;
  flex-shrink: 0;
}

.lee-orq-chat-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(36, 37, 31, 0.08);
}

.lee-orq-chat-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

.lee-orq-chat-agent-name {
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}

.lee-orq-chat-divider {
  width: 1px;
  height: 28px;
  background: rgba(36, 37, 31, 0.12);
}

.lee-orq-chat-task-meta {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
}

.lee-orq-chat-task-label {
  color: var(--ink-faint);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lee-orq-chat-task-title {
  width: max-content;
  max-width: clamp(180px, calc(100vw - 360px), 520px);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  word-break: break-word;
}

.lee-orq-chat-modal .lee-chat-messages {
  padding: 106px clamp(22px, 5vw, 56px) 26px;
  gap: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(246,245,240,0.72));
}

.lee-orq-chat-modal .lee-chat-msg {
  max-width: min(82%, 620px);
}

.lee-orq-chat-modal .lee-chat-bubble {
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.58;
  box-shadow: 0 1px 0 rgba(36, 37, 31, 0.04);
}

.lee-orq-chat-modal .lee-chat-msg.orquestrador .lee-chat-bubble {
  background: #20221c;
  border-bottom-left-radius: 5px;
}

.lee-orq-chat-modal .lee-chat-msg.agente .lee-chat-bubble {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  color: var(--ink);
}

.lee-orq-chat-modal .lee-chat-msg.user .lee-chat-bubble {
  background: rgba(36, 37, 31, 0.06);
  color: var(--ink);
  border-bottom-right-radius: 5px;
  box-shadow: none;
}

.lee-orq-chat-modal .lee-chat-msg.agente .lee-chat-pending-action,
.lee-orq-chat-modal .lee-chat-msg.agente .lee-chat-eval-draft,
.lee-orq-chat-modal .lee-chat-msg.agente .lee-chat-motivo {
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(36, 37, 31, 0.06);
  box-shadow: 0 1px 0 rgba(36, 37, 31, 0.04);
}

.lee-orq-chat-modal .lee-chat-msg-author {
  font-size: 11px;
  padding: 0 10px;
}

.lee-orq-chat-modal .lee-chat-input-row {
  margin: 14px 18px 16px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 37, 31, 0.1);
  border-radius: 24px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 14px 34px rgba(36, 37, 31, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lee-orq-chat-modal .lee-chat-composer-main {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.lee-orq-chat-modal .lee-chat-file-input {
  display: none;
}

.lee-orq-chat-modal .lee-chat-attach {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lee-orq-chat-modal .lee-chat-attach:hover {
  background: rgba(36, 37, 31, 0.06);
  color: var(--ink);
}

.lee-orq-chat-modal .lee-chat-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lee-orq-chat-modal .lee-chat-attach-list:empty {
  display: none;
}

.lee-orq-chat-modal .lee-chat-attach-chip {
  max-width: 220px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(36, 37, 31, 0.06);
  color: var(--ink-soft);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lee-orq-chat-modal .lee-chat-input {
  min-height: 34px;
  padding: 7px 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: none;
}

.lee-orq-chat-modal .lee-chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(63, 95, 76, 0.22);
}

.lee-orq-chat-modal .lee-chat-send:hover {
  opacity: 1;
  background: #314b3a;
}

.lee-orq-chat-modal .lee-chat-send svg {
  display: block;
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
}

@media (max-width: 720px) {
  .lee-orq-chat-backdrop {
    display: none;
  }

  .lee-orq-chat-modal {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: auto;
    max-height: none;
    transform: none;
    border-radius: 0;
  }

  /* Header vira uma barra fixa normal (não mais flutuante/absoluta) — assim
     o card de tarefa nunca sobrepõe a primeira mensagem, mesmo com título
     de 2 linhas: as mensagens simplesmente começam depois dele no fluxo. */
  .lee-orq-chat-head {
    position: static !important;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    pointer-events: auto;
  }

  .lee-orq-chat-back {
    display: flex;
    pointer-events: auto;
  }

  .lee-orq-chat-modal .lee-chat-messages {
    padding: 18px 14px;
  }

  .lee-orq-chat-modal .lee-chat-input-row {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  }

  .lee-orq-chat-modal .lee-chat-msg {
    max-width: 90%;
  }

  /* Texto continua alinhado à esquerda dentro do bloco, mas o bloco em si
     fica centralizado na tela em vez de grudado na borda esquerda. */
  .lee-orq-chat-modal .lee-chat-msg.agent,
  .lee-orq-chat-modal .lee-chat-msg.orquestrador,
  .lee-orq-chat-modal .lee-chat-msg.agente {
    align-self: center;
  }
  .lee-orq-chat-modal .lee-chat-msg .lee-chat-bubble {
    text-align: left;
  }

  .lee-orq-chat-modal .lee-chat-popup-title {
    font-size: 14px;
  }

  .lee-orq-chat-head-left {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: 100%;
  }

  .lee-orq-chat-task-card {
    width: 100%;
  }

  .lee-orq-chat-task-row {
    grid-template-columns: 26px 26px max-content 1px minmax(0, 1fr) 26px;
    gap: 7px;
  }

  .lee-orq-chat-avatar {
    width: 26px;
    height: 26px;
  }

  .lee-orq-chat-agent-name {
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EU DO FUTURO
   ═══════════════════════════════════════════════════════════════════════════ */
.lee-eu-futuro-panel {
  display: none;
  flex-direction: column;
  position: fixed;
  left: var(--lee-rail-w, 76px);
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 175;
  background: var(--bg);
  overflow: hidden;
}
body.lee-shell-eu-futuro .lee-eu-futuro-panel { display: flex; }
.lee-euf-title-area {
  position: relative;
  flex-shrink: 0;
  padding: 18px 0 10px;
  text-align: center;
}
.lee-euf-back {
  position: absolute;
  left: 28px;
  top: 22px;
  padding: 6px 0;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}
.lee-euf-back:hover { color: var(--ink); }
.lee-euf-title {
  font-family: var(--font, 'Playfair Display', serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
}
.lee-euf-meta {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 4px;
  font-family: system-ui, sans-serif;
}
.lee-euf-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  padding: 8px 28px 16px;
  gap: 0;
}
.lee-euf-embed-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
}
.lee-euf-embed-frame {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.lee-euf-embed-frame iframe { width: 100%; height: 100%; border: none; display: block; }
.lee-euf-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 10px;
  cursor: pointer;
}
.lee-euf-field.left { align-items: flex-end; }
.lee-euf-field.right { align-items: flex-start; }
.lee-euf-field-box {
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 13px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.09), 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.15s;
  min-width: 140px;
  max-width: 175px;
  width: fit-content;
}
.lee-euf-field-box:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.06); }
.lee-euf-field.left .lee-euf-field-box { text-align: right; }
.lee-euf-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
  font-family: system-ui, sans-serif;
}
.lee-euf-valor {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 2px;
  font-family: system-ui, sans-serif;
}
.lee-euf-detalhe {
  font-size: 10px;
  color: var(--ink-soft);
  line-height: 1.35;
  font-family: system-ui, sans-serif;
}
/* Edit mode */
.lee-euf-field-box input,
.lee-euf-field-box textarea {
  width: 100%;
  border: none;
  background: none;
  outline: none;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  resize: none;
  padding: 0;
}
.lee-euf-field-box input.euf-valor-input { font-size: 12px; margin-bottom: 4px; }
.lee-euf-field-box textarea.euf-detalhe-input { font-size: 10px; color: var(--ink-soft); height: 36px; }
/* Footer */
.lee-euf-footer {
  flex-shrink: 0;
  padding: 10px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lee-euf-footer-note {
  font-size: 11px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: system-ui, sans-serif;
}
.lee-euf-footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-soft);
  flex-shrink: 0;
}
.lee-euf-edit-btn {
  font-size: 11px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: none;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  transition: all 0.12s;
}
.lee-euf-edit-btn:hover { background: var(--rail); color: var(--ink); }
.lee-euf-edit-btn.saving { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Eu do Futuro — inputs (edit mode) */
.lee-euf-inp-val, .lee-euf-inp-det {
  width: 100%;
  font-family: system-ui, sans-serif;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  outline: none;
  padding: 2px 0;
  color: var(--ink);
  font-size: 12px;
  margin-top: 2px;
}
.lee-euf-inp-det { font-size: 10px; color: var(--ink-soft); }

/* Context card */
.lee-euf-ctx-files {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 8px;
}
.lee-euf-ctx-file {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink);
  font-family: system-ui, -apple-system, sans-serif;
}
.lee-euf-ctx-file-icon {
  width: 12px;
  height: 14px;
  border: 1.5px solid var(--ink-faint);
  border-radius: 2px;
  flex-shrink: 0;
  position: relative;
}
.lee-euf-ctx-file-icon::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 4px;
  border-left: 1.5px solid var(--ink-faint);
  border-bottom: 1.5px solid var(--ink-faint);
  background: #fff;
}
.lee-euf-ctx-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lee-euf-ctx-file-remove {
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: 13px; line-height: 1;
  padding: 0 2px; opacity: 0;
  transition: opacity 0.1s;
}
.lee-euf-ctx-file:hover .lee-euf-ctx-file-remove { opacity: 1; }
.lee-euf-ctx-add-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  text-align: left;
}
.lee-euf-ctx-add-btn:hover { color: var(--ink); }

/* Orquestração — sugestão inline card */
.lee-orq-sugestao-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--rail);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: system-ui, sans-serif;
}
.lee-orq-sugestao-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.lee-orq-sugestao-txt { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }

/* Orquestração — card head layout */
.lee-orq-card-head { display: flex; align-items: flex-start; gap: 10px; }
.lee-orq-card-nome {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  font-family: system-ui, sans-serif;
}
.lee-orq-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lee-orq-tag {
  font-size: 10px;
  font-family: system-ui, sans-serif;
  color: var(--ink-soft);
  background: var(--rail);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

/* Orquestração — message */
.lee-orq-msg {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-family: system-ui, sans-serif;
}

/* Orquestração — card footer */
.lee-orq-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.lee-orq-obrigacao {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: system-ui, sans-serif;
}
.lee-orq-obrigacao-lbl {
  font-size: 10px;
  color: var(--ink-faint);
  white-space: nowrap;
}
.lee-orq-obrig-range { width: 80px; cursor: pointer; }
.lee-orq-obrigacao-val {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft);
  min-width: 20px;
  font-family: system-ui, sans-serif;
}

/* Orquestração — action buttons */
.lee-orq-btn-ver, .lee-orq-btn-agir {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: none;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  transition: background 0.12s;
  white-space: nowrap;
}
.lee-orq-btn-ver:hover, .lee-orq-btn-agir:hover { background: var(--rail); color: var(--ink); }

/* Orquestração — orphan item */
.lee-orq-orphan-name {
  font-size: 11px;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Match Eu do Futuro ─────────────────────────────────────────────────── */

.lee-match-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}

.lee-match-alto {
  background: rgba(63, 101, 78, 0.14);
  color: var(--lee-ds-primary-active);
}

.lee-match-medio {
  background: rgba(178, 141, 52, 0.16);
  color: #7a5d1d;
}

.lee-match-baixo {
  background: rgba(164, 68, 54, 0.14);
  color: #8c3a2c;
}

.lee-workspace-match {
  padding: 0 24px;
}

.lee-match-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 4px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--lee-ds-surface-soft);
  border: 1px solid var(--lee-ds-hairline-soft);
}

.lee-match-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lee-ds-muted);
}

.lee-match-question {
  margin: 0;
  font-size: 14px;
  color: var(--lee-ds-body-strong);
}

.lee-match-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lee-match-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1 1 140px;
  padding: 10px 12px;
  border: 1px solid var(--lee-ds-hairline);
  border-radius: 8px;
  background: var(--lee-ds-canvas);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.lee-match-option:hover {
  background: var(--lee-ds-surface-card);
  border-color: var(--lee-ds-primary);
}

.lee-match-option:disabled {
  opacity: 0.55;
  cursor: default;
}

.lee-match-option span {
  font-size: 13px;
  font-weight: 600;
  color: var(--lee-ds-ink);
}

.lee-match-option small {
  font-size: 11px;
  color: var(--lee-ds-muted);
}
