/* Página Conf. sistema → Chatbot (Cloud Agent) */
.cursor-chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 88px);
  min-height: 520px;
  background: #0b1220;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(79, 140, 255, 0.22);
  color: #e8eef8;
  position: relative;
}

.cursor-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  flex-shrink: 0;
}

.cursor-chat-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cursor-chat-title-bot {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.45));
}

.cursor-chat-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.cursor-chat-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.cursor-chat-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cursor-chat-btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: #334155;
  color: #e2e8f0;
}

.cursor-chat-btn.primary { background: #4f46e5; color: #fff; }
.cursor-chat-btn.success { background: #16a34a; color: #052e16; }
.cursor-chat-btn.danger { background: #7f1d1d; color: #fecaca; }
.cursor-chat-btn.warn { background: #b45309; color: #fffbeb; }
.cursor-chat-btn.warn.is-on { background: #ca8a04; color: #422006; }
.cursor-chat-btn.is-on { background: #4338ca; color: #fff; }
.cursor-chat-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.cursor-chat-config-divider {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #334155;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.cursor-chat-config-hint {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.cursor-chat-config-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.35;
  cursor: pointer;
}

.cursor-chat-config-check input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  flex: 0 0 16px !important;
  transform: none !important;
  accent-color: #6366f1;
  cursor: pointer;
}

.cursor-chat-config-dialog {
  width: min(420px, 96vw);
  max-height: min(88vh, 820px);
}

.cursor-chat-config-body {
  padding: 14px 16px 18px;
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.eco-model-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: none;
  overflow: visible;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 4px;
  background: #0f172a;
}
.eco-model-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  cursor: pointer;
}
.eco-model-row:hover { background: #1e293b; }
.eco-model-row.is-selected { background: #312e81; }
.eco-model-row-name { flex: 1; min-width: 0; }
.eco-model-row-variant {
  color: #94a3b8;
  font-size: 12px;
  margin-left: 6px;
}
.eco-model-edit-btn {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}
.eco-model-edit-btn:hover { color: #fff; }
.eco-model-edit {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 12px;
  background: #111827;
  display: grid;
  gap: 6px;
}
.eco-model-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.eco-model-edit-section {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.eco-model-edit-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #e2e8f0;
  cursor: pointer;
}
.eco-model-edit-opt input[type="radio"],
.eco-model-edit-opt input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 16px !important;
  transform: none !important;
  border: 2px solid #64748b;
  background: #0f172a;
  cursor: pointer;
}
.eco-model-edit-opt input[type="radio"] {
  border-radius: 50%;
}
.eco-model-edit-opt input[type="checkbox"] {
  border-radius: 4px;
}
.eco-model-edit-opt input[type="radio"]:checked {
  border-color: #6366f1;
  background: radial-gradient(circle, #c7d2fe 0 35%, #6366f1 36% 100%);
}
.eco-model-edit-opt input[type="checkbox"]:checked {
  border-color: #6366f1;
  background: #6366f1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2 6.6 11.2 12.5 5.2' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}
.eco-model-edit-opt input[type="radio"]:focus-visible,
.eco-model-edit-opt input[type="checkbox"]:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.eco-model-edit-fast {
  justify-content: space-between;
}
.eco-model-edit-head .cursor-chat-btn {
  background: transparent;
  border: 1px solid #475569;
  color: #cbd5e1;
}
.eco-model-edit-head .cursor-chat-btn:hover {
  background: #1e293b;
  color: #f8fafc;
}

.eco-free-select {
  min-width: 180px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font: inherit;
}

.eco-free-model-fields {
  display: grid;
  gap: 8px;
}

.eco-free-model-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #e2e8f0;
}

.eco-free-model-row span {
  flex: 1;
  min-width: 0;
}

.cursor-chat-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  flex: 1;
  min-height: 0;
  position: relative;
}

.cursor-chat-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.15);
  background: #0f172a;
  overflow: hidden;
  padding: 10px;
}

.cursor-chat-hist-toggle {
  display: none;
}

.cursor-chat-hist-close {
  display: none;
  margin-left: auto;
  padding: 4px 10px;
  min-width: 36px;
}

.cursor-chat-hist-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  margin: -10px -10px 10px;
  padding: 8px 10px 0;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.cursor-chat-hist-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 6px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.cursor-chat-hist-tab.active {
  color: #93c5fd;
  border-bottom-color: #3b82f6;
}

#cursorChatAgentList,
#cursorChatFavoriteList {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.cursor-chat-pending-prs {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: 42%;
  min-height: 0;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.cursor-chat-pending-prs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.cursor-chat-pending-prs-head strong {
  font-size: 11px;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.02em;
}

.cursor-chat-pending-prs-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cursor-chat-pending-prs-head .cursor-chat-btn {
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 8px;
}

.cursor-chat-pending-prs-head .cursor-chat-tool-btn {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.cursor-chat-pending-prs-status {
  margin: 0 0 6px;
  font-size: 10px;
  color: #fbbf24;
}

.cursor-chat-pending-prs-list {
  overflow: auto;
  min-height: 0;
}

.cursor-chat-pending-prs-empty {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

.cursor-chat-pending-pr {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
}

.cursor-chat-pending-pr-title {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.cursor-chat-pending-pr-title strong {
  display: block;
  font-size: 12px;
  color: #f8fafc;
  margin-bottom: 3px;
}

.cursor-chat-pending-pr-title span {
  display: block;
  font-size: 10px;
  color: #94a3b8;
}

.cursor-chat-pending-pr-pub {
  width: auto;
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
}

.cursor-chat-pending-pr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cursor-chat-pending-pr-actions .cursor-chat-btn {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 11px;
  text-align: center;
  text-decoration: none;
}

.cursor-chat-pending-pr-deploy {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cursor-chat-pending-pr-deploy.is-pending,
.cursor-chat-pending-pr-deploy.is-loading {
  border-color: rgba(251, 191, 36, 0.35);
}

.cursor-chat-pending-pr-deploy.is-live {
  border-color: rgba(74, 222, 128, 0.4);
}

.cursor-chat-pending-pr-deploy.is-failed {
  border-color: rgba(248, 113, 113, 0.4);
}

.cursor-chat-deploy-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #4ade80;
}

.cursor-chat-deploy-icon.is-err {
  color: #f87171;
}

.cursor-chat-deploy-spin {
  width: 14px;
  height: 14px;
  border: 0;
  background: none;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

@keyframes cursor-chat-deploy-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes cursor-chat-deploy-spin-ccw {
  to {
    transform: rotate(-360deg);
  }
}

.cursor-chat-providers {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  min-height: 36px;
  align-items: center;
}

.cursor-chat-providers:empty::before {
  content: 'IAs: envie uma mensagem nesta conversa';
  color: #64748b;
  font-size: 11px;
}

.cursor-chat-prov-hint {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}

.cursor-chat-prov-hint-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cursor-chat-prov-gear {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #1e293b;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}
.cursor-chat-prov-gear:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.55);
}
.cursor-chat-prov-gear:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.8);
  outline-offset: 1px;
}

.cursor-chat-ia-usage-dialog {
  width: min(680px, 96vw);
  max-height: 78vh;
}
.cursor-chat-ia-usage-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 10px;
  flex-wrap: wrap;
}
.cursor-chat-ia-usage-toolbar label {
  font-size: 12px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cursor-chat-ia-usage-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.cursor-chat-ia-usage-range-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font: inherit;
  cursor: pointer;
  min-width: 132px;
  text-align: left;
}
.cursor-chat-ia-usage-range-btn:hover {
  border-color: #64748b;
}
.cursor-chat-daterange {
  position: absolute;
  top: calc(100% + 6px);
  left: 12px;
  right: 12px;
  z-index: 8;
  width: auto;
  max-width: 280px;
  box-sizing: border-box;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px 10px 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  color: #e5e5e5;
}
.cursor-chat-daterange-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cursor-chat-daterange-head strong {
  flex: 1;
  font-size: 13px;
  font-weight: 650;
}
.cursor-chat-daterange-head button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d4d4d4;
  cursor: pointer;
  font-size: 16px;
}
.cursor-chat-daterange-head button:hover {
  background: #1a1a1a;
}
.cursor-chat-daterange-utc {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: #171717;
  color: #a3a3a3;
}
.cursor-chat-daterange-weekdays,
.cursor-chat-daterange-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  min-width: 0;
  text-align: center;
}
.cursor-chat-daterange-weekdays {
  margin-bottom: 4px;
  font-size: 10px;
  color: #737373;
}
.cursor-chat-daterange-weekdays span {
  min-width: 0;
  overflow: hidden;
}
.cursor-chat-daterange-grid button {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e5e5e5;
  font-size: 12px;
  line-height: 32px;
  cursor: pointer;
}
.cursor-chat-daterange-grid button:hover:not(:disabled) {
  background: #1f1f1f;
}
.cursor-chat-daterange-grid button:disabled {
  color: #404040;
  cursor: default;
}
.cursor-chat-daterange-grid button.is-out {
  color: #525252;
}
.cursor-chat-daterange-grid button.is-in-range {
  background: #262626;
  border-radius: 0;
}
.cursor-chat-daterange-grid button.is-start,
.cursor-chat-daterange-grid button.is-end,
.cursor-chat-daterange-grid button.is-single {
  background: #f5f5f5;
  color: #111;
  font-weight: 700;
  border-radius: 8px;
}
.cursor-chat-daterange-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
}
.cursor-chat-daterange-presets button {
  border: 1px solid #333;
  background: #141414;
  color: #d4d4d4;
  border-radius: 999px;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
}
.cursor-chat-daterange-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.cursor-chat-daterange-actions button {
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
#cursorChatIaUsageCalCancel {
  background: transparent;
  color: #a3a3a3;
}
#cursorChatIaUsageCalApply {
  background: #f5f5f5;
  color: #111;
  font-weight: 650;
}
.cursor-chat-ia-usage-pct {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
  color: #86efac;
}
.cursor-chat-ia-usage-pct.is-neg {
  color: #fca5a5;
}
.cursor-chat-ia-usage-dialog {
  overflow: visible;
}
.cursor-chat-ia-usage-body {
  padding: 0 16px 16px;
  overflow: auto;
  max-height: min(58vh, 520px);
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}
.cursor-chat-ia-usage-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 520px) {
  .cursor-chat-ia-usage-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.cursor-chat-ia-usage-stat {
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
}
.cursor-chat-ia-usage-stat strong {
  display: block;
  font-size: 14px;
  color: #f8fafc;
}
.cursor-chat-ia-usage-stat span {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cursor-chat-ia-usage-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
}
.cursor-chat-ia-usage-table th,
.cursor-chat-ia-usage-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  vertical-align: top;
}
.cursor-chat-ia-usage-table th {
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.cursor-chat-ia-usage-table th.num,
.cursor-chat-ia-usage-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cursor-chat-ia-usage-section {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 4px 0 8px;
}
.cursor-chat-ia-usage-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
}
.cursor-chat-ia-usage-refresh-btn svg {
  display: block;
}
.cursor-chat-ia-usage-tabs {
  display: flex;
  gap: 4px;
  margin: 0 -16px 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.cursor-chat-ia-usage-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 6px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.25;
}
.cursor-chat-ia-usage-tab.active {
  color: #93c5fd;
  border-bottom-color: #3b82f6;
}
.cursor-chat-ia-usage-panel {
  min-height: 80px;
}
.cursor-chat-ia-usage-chart-block + .cursor-chat-ia-usage-chart-block {
  margin-top: 16px;
}
.cursor-chat-ia-usage-chart-wrap {
  position: relative;
  height: 220px;
  margin-bottom: 4px;
}
.cursor-chat-ia-usage-chart-wrap--model {
  height: 320px;
  min-height: 220px;
}
.cursor-chat-ia-usage-legend {
  margin: 4px 0 12px;
}
.cursor-chat-ia-usage-legend > summary {
  cursor: pointer;
  list-style: none;
}
.cursor-chat-ia-usage-legend > summary::-webkit-details-marker {
  display: none;
}
.cursor-chat-ia-usage-table--legend {
  margin-bottom: 0;
}
.cursor-chat-ia-usage-empty {
  color: #64748b;
  padding: 12px 0;
}
.cursor-chat-ia-usage-ok { color: #86efac; }
.cursor-chat-ia-usage-nok { color: #fca5a5; }
.cursor-chat-ia-usage-est {
  font-size: 10px;
  color: #64748b;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.cursor-chat-ia-usage-note {
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 12px;
}

.cursor-chat-prov {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 8px 3px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #1e293b;
  color: #94a3b8;
  max-width: 100%;
  cursor: pointer;
  font-family: inherit;
}

button.cursor-chat-prov {
  appearance: none;
  -webkit-appearance: none;
}

.cursor-chat-prov:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.8);
  outline-offset: 1px;
}

.cursor-chat-prov-ico {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #0f172a;
  background: #94a3b8;
  flex-shrink: 0;
}

.cursor-chat-prov[data-id='gemini'] .cursor-chat-prov-ico { background: #8ab4f8; }
.cursor-chat-prov[data-id='groq'] .cursor-chat-prov-ico { background: #f97316; }
.cursor-chat-prov[data-id='openrouter'] .cursor-chat-prov-ico { background: #a78bfa; }
.cursor-chat-prov[data-id='deepseek'] .cursor-chat-prov-ico { background: #38bdf8; }
.cursor-chat-prov[data-id='mistral'] .cursor-chat-prov-ico { background: #fbbf24; }
.cursor-chat-prov[data-id='kimi'] .cursor-chat-prov-ico { background: #34d399; }
.cursor-chat-prov[data-id='ops'] .cursor-chat-prov-ico { background: #94a3b8; }
.cursor-chat-prov[data-id='cursor'] .cursor-chat-prov-ico { background: #e2e8f0; }

.cursor-chat-prov.is-ok {
  border-color: rgba(34, 197, 94, 0.55);
  color: #86efac;
  background: rgba(22, 163, 74, 0.15);
}
.cursor-chat-prov.is-nok {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.12);
}
.cursor-chat-prov.is-idle {
  opacity: 1;
}
.cursor-chat-prov.is-dim {
  opacity: 0.62;
}
.cursor-chat-prov.is-running {
  border-color: rgba(59, 130, 246, 0.7);
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.18);
}
.cursor-chat-prov.is-selected {
  border-color: rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.45);
  color: #e2e8f0;
  opacity: 1;
}

.cursor-chat-prov-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cursor-chat-agent-item,
.cursor-chat-fav-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 10px;
  padding: 10px 56px 10px 12px;
  cursor: pointer;
  margin-bottom: 6px;
  position: relative;
}

.cursor-chat-agent-item:hover,
.cursor-chat-fav-item:hover {
  background: rgba(79, 70, 229, 0.1);
}

.cursor-chat-agent-item.is-running {
  border-color: #f59e0b;
}
.cursor-chat-agent-item.is-paused {
  border-color: #64748b;
}
.cursor-chat-continue-bar {
  margin-top: 10px;
}
.cursor-chat-continue-work {
  font-size: 13px;
}

.cursor-chat-agent-item strong,
.cursor-chat-fav-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.cursor-chat-agent-item span,
.cursor-chat-fav-item span {
  font-size: 11px;
  color: #94a3b8;
}

.cursor-chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.cursor-chat-bubble.streaming::after {
  content: ' ▍';
  animation: cursor-chat-caret 1s step-end infinite;
  opacity: 0.7;
}
.cursor-chat-bubble.typing {
  align-self: flex-start;
  background: #1e293b;
  min-width: 56px;
  padding: 12px 16px;
}
.cursor-chat-bubble.typing::after {
  content: none;
}
.cursor-chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 16px;
}
.cursor-chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: cursor-chat-typing-dot 1.2s infinite ease-in-out both;
}
.cursor-chat-typing span:nth-child(2) {
  animation-delay: 0.16s;
}
.cursor-chat-typing span:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes cursor-chat-typing-dot {
  0%, 80%, 100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
@keyframes cursor-chat-caret {
  50% { opacity: 0; }
}

.cursor-chat-statusline {
  padding: 8px 16px;
  font-size: 12px;
  color: #93c5fd;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  min-height: 34px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.cursor-chat-statusline.is-err {
  color: #fca5a5;
}
.cursor-chat-statusline.is-warn {
  color: #fcd34d;
}
.cursor-chat-statusline.is-ok {
  color: #86efac;
}

.cursor-chat-pr-history-dialog {
  width: min(640px, 96vw) !important;
  max-height: 82vh !important;
  display: flex;
  flex-direction: column;
}

#cursorChatPrHistoryListView,
#cursorChatPrHistoryDetailView {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#cursorChatPrHistoryListView[hidden],
#cursorChatPrHistoryDetailView[hidden] {
  display: none !important;
}

.cursor-chat-pr-history-body {
  flex: 1;
  overflow: auto;
  padding: 14px 16px 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #e2e8f0;
}

.cursor-chat-pr-history-body h1,
.cursor-chat-pr-history-body h2,
.cursor-chat-pr-history-body h3 {
  margin: 0.85em 0 0.4em;
  font-size: 1.05em;
  color: #f8fafc;
}

.cursor-chat-pr-history-body p {
  margin: 0.5em 0;
}

.cursor-chat-pr-history-body ul,
.cursor-chat-pr-history-body ol {
  margin: 0.4em 0 0.6em 1.2em;
}

.cursor-chat-pr-history-foot {
  padding: 10px 16px 14px;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cursor-chat-pr-hist-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  padding: 0 16px;
  background: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.cursor-chat-pr-hist-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 6px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.cursor-chat-pr-hist-tab.active {
  color: #93c5fd;
  border-bottom-color: #3b82f6;
}

.cursor-chat-pr-item-row {
  margin-bottom: 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
}

.cursor-chat-pr-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 10px;
  padding: 10px 12px 6px;
  cursor: pointer;
  margin-bottom: 0;
}
.cursor-chat-pr-revert {
  margin: 0 12px 8px;
  font-size: 12px;
}
.cursor-chat-continue-wait {
  margin: 10px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.cursor-chat-pr-item:hover {
  background: rgba(79, 70, 229, 0.1);
}

.cursor-chat-pr-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: #f8fafc;
}

.cursor-chat-pr-item span {
  font-size: 11px;
  color: #94a3b8;
}

.cursor-chat-pr-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px;
}

.cursor-chat-pr-item-actions .cursor-chat-btn {
  font-size: 11px;
  padding: 5px 8px;
  text-decoration: none;
  text-align: center;
}

body.cursor-chat-preview-mode {
  padding-top: 0;
}

#cursor-chat-preview-banner {
  display: none !important;
}

.cursor-chat-messages {
  flex: 1;
  overflow: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cursor-chat-bubble {
  position: relative;
  max-width: min(720px, 92%);
  padding: 10px 72px 10px 14px;
  border-radius: 16px;
  line-height: 1.45;
  font-size: 14px;
  word-break: break-word;
  position: relative;
}

.cursor-chat-star {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  opacity: 0.55;
}

.cursor-chat-bubble.user .cursor-chat-star {
  color: rgba(255, 255, 255, 0.8);
}

.cursor-chat-star:hover,
.cursor-chat-star.is-on {
  opacity: 1;
  color: #fbbf24;
}

.cursor-chat-fav-item .cursor-chat-star {
  position: absolute;
  top: 8px;
  right: 6px;
}

.cursor-chat-bubble.assistant.is-done {
  padding-bottom: 22px;
}

.cursor-chat-bubble.assistant.has-used-ias {
  padding-bottom: 14px;
}

.cursor-chat-used-ias {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 28px 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.cursor-chat-used-ias .cursor-chat-prov {
  cursor: help;
  pointer-events: auto;
  position: relative;
  max-width: 100%;
}

/* Motivo da falha/não-uso ao passar o mouse (ou toque no celular). */
.cursor-chat-used-ias .cursor-chat-prov[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 30;
  min-width: 132px;
  max-width: min(280px, 72vw);
  padding: 6px 8px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: normal;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.cursor-chat-used-ias .cursor-chat-prov.is-nok[data-tip]::after {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}
.cursor-chat-used-ias .cursor-chat-prov[data-tip]:hover::after,
.cursor-chat-used-ias .cursor-chat-prov[data-tip]:focus-visible::after,
.cursor-chat-used-ias .cursor-chat-prov[data-tip].is-tip-open::after {
  opacity: 1;
  transform: none;
}

.cursor-chat-bubble .cursor-chat-done-icon {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.45);
  pointer-events: none;
}

.cursor-chat-bubble .md-body {
  white-space: normal;
}

.cursor-chat-bubble.streaming .md-body {
  white-space: pre-wrap;
}

.cursor-chat-bubble.user .md-body {
  white-space: pre-wrap;
}

.cursor-chat-bubble.user {
  align-self: flex-end;
  background: #4f46e5;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.cursor-chat-bubble.assistant {
  align-self: flex-start;
  background: #1e293b;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.cursor-chat-bubble.error {
  align-self: flex-start;
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.cursor-chat-bubble.meta {
  align-self: center;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  padding: 4px 8px;
}

.cursor-chat-map-fold {
  align-self: stretch;
  max-width: min(720px, 92%);
  margin: 2px 0 14px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 12px;
}

.cursor-chat-map-fold > summary {
  cursor: pointer;
  font-weight: 700;
  color: #93c5fd;
  list-style: none;
  user-select: none;
}

.cursor-chat-map-fold > summary::-webkit-details-marker {
  display: none;
}

.cursor-chat-map-fold > summary::before {
  content: '▸ ';
}

.cursor-chat-map-fold[open] > summary::before {
  content: '▾ ';
}

.cursor-chat-map-fold .md-body {
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}

.cursor-chat-map-fold-sep {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: 12px 0;
}

.cursor-chat-review {
  display: none;
  margin: 0 16px 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-size: 13px;
}

.cursor-chat-review.visible { display: block; }

.cursor-chat-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cursor-chat-files {
  margin-top: 8px;
  max-height: 120px;
  overflow: auto;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #cbd5e1;
}

.cursor-chat-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  background: #0f172a;
  flex-shrink: 0;
}

.cursor-chat-input-shell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid #334155;
  border-radius: 14px;
  background: #1e293b;
  padding: 10px 12px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  position: relative;
}

.cursor-chat-input-shell:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.cursor-chat-input-shell textarea {
  width: 100%;
  min-height: 44px;
  max-height: 200px;
  height: 44px;
  resize: none;
  overflow-y: hidden;
  border: 0;
  outline: none;
  background: transparent;
  color: #f8fafc;
  padding: 4px 2px;
  font: inherit;
  line-height: 1.45;
  box-sizing: border-box;
}

.cursor-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
}

.cursor-chat-toolbar-left,
.cursor-chat-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cursor-chat-tool-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #475569;
  background: #334155;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.cursor-chat-tool-btn:hover {
  background: #475569;
  border-color: #64748b;
}

.cursor-chat-tool-btn.is-recording {
  background: #b91c1c;
  border-color: #ef4444;
  color: #fff;
  animation: cursor-chat-mic-pulse 1.1s ease-in-out infinite;
}

.cursor-chat-op-mode-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 1;
}

.cursor-chat-op-mode {
  max-width: 148px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #475569;
  background: #334155;
  color: #e2e8f0;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 0 8px;
  cursor: pointer;
}

.cursor-chat-op-mode:focus {
  outline: none;
  border-color: #818cf8;
}

@keyframes cursor-chat-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.cursor-chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #16a34a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.cursor-chat-send-btn:hover {
  background: #15803d;
}

.cursor-chat-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cursor-chat-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cursor-chat-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #334155;
  background: #1e293b;
}

.cursor-chat-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.cursor-chat-preview-item button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.cursor-chat-bubble.user-with-image {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cursor-chat-bubble.user-with-image img,
.cursor-chat-attach-thumb {
  width: 112px;
  height: 112px;
  max-width: 112px;
  max-height: 112px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  cursor: zoom-in;
  display: block;
}

.cursor-chat-img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  background: rgba(2, 6, 23, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}

.cursor-chat-img-lightbox[hidden] {
  display: none !important;
}

.cursor-chat-img-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  cursor: default;
}

.cursor-chat-img-lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

body.cursor-chat-img-lightbox-open {
  overflow: hidden;
}

.cursor-chat-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(79, 140, 255, 0.18);
  color: #93c5fd;
}

.cursor-chat-badge.ok { background: rgba(34,197,94,.18); color: #86efac; }
.cursor-chat-badge.warn { background: rgba(245,158,11,.18); color: #fcd34d; }
.cursor-chat-badge.err { background: rgba(239,68,68,.18); color: #fca5a5; }

body.cursor-chat-preview-mode {
  padding-top: 0;
}

#cursor-chat-preview-banner {
  display: none !important;
}

body.cursor-chat-preview-mode #cursor-chat-preview-banner {
  display: none !important;
}

.cursor-chat-publish-bar {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.cursor-chat-publish-bar[hidden] {
  display: none !important;
}

.cursor-chat-side-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: rgba(127, 29, 29, 0.55);
  color: #fecaca;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.cursor-chat-mention {
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  opacity: 0.65;
}

.cursor-chat-mention:hover {
  opacity: 1;
  color: #38bdf8;
}

.cursor-chat-agent-item .cursor-chat-mention,
.cursor-chat-fav-item .cursor-chat-mention {
  position: absolute;
  top: 6px;
  right: 30px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.cursor-chat-bubble .cursor-chat-mention {
  position: absolute;
  top: 4px;
  right: 28px;
  width: auto;
  min-width: 26px;
  height: 26px;
  padding: 0 4px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cursor-chat-bubble.user .cursor-chat-mention {
  color: rgba(255, 255, 255, 0.85);
}

.cursor-chat-slash-menu {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% - 6px);
  z-index: 40;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 6px;
}

.cursor-chat-slash-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  padding: 8px 10px;
}

.cursor-chat-slash-item strong {
  font-size: 13px;
  font-weight: 700;
}

.cursor-chat-slash-item span {
  font-size: 11px;
  color: #94a3b8;
}

.cursor-chat-slash-item.is-active,
.cursor-chat-slash-item:hover {
  background: rgba(99, 102, 241, 0.22);
}

.cursor-chat-agent-token {
  display: inline;
  color: #93c5fd;
  font-weight: 700;
}

.cursor-chat-bubble .md-body p {
  margin: 0 0 0.55em;
}

.cursor-chat-bubble .md-body p:last-child {
  margin-bottom: 0;
}

.cursor-chat-bubble .md-body strong {
  font-weight: 700;
  color: #f8fafc;
}

.cursor-chat-bubble .md-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(15, 23, 42, 0.65);
  padding: 1px 6px;
  border-radius: 6px;
}

.cursor-chat-bubble .md-pre {
  margin: 8px 0;
  padding: 10px 12px;
  overflow: auto;
  border-radius: 10px;
  background: #020617;
  border: 1px solid #334155;
  font-size: 12px;
  line-height: 1.4;
}

.cursor-chat-bubble .md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12px;
}

.cursor-chat-bubble .md-table th,
.cursor-chat-bubble .md-table td {
  border: 1px solid #475569;
  padding: 6px 8px;
  text-align: left;
}

.cursor-chat-bubble .md-table th {
  background: rgba(15, 23, 42, 0.8);
}

.cursor-chat-bubble .md-ul {
  margin: 6px 0;
  padding-left: 1.2em;
}

.cursor-chat-bubble .cursor-chat-work-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 12px;
  font-weight: 600;
  color: #93c5fd;
  white-space: normal;
}

.cursor-chat-work-status-text {
  flex: 1 1 auto;
  min-width: 0;
}

.cursor-chat-work-status .cursor-chat-work-ia {
  cursor: default;
  pointer-events: none;
  flex-shrink: 0;
}

.cursor-chat-work-status .cursor-chat-live-stop {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
}

.cursor-chat-bubble .cursor-chat-work-status[hidden] {
  display: none !important;
}

.cursor-chat-specialist-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  max-width: 160px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cursor-chat-specialist-chip[hidden] {
  display: none !important;
}

.cursor-chat-specialist-chip button {
  border: 0;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

.cursor-chat-bubble.specialist {
  align-self: flex-end;
  background: linear-gradient(135deg, #4338ca, #6366f1);
  color: #eef2ff;
  font-weight: 700;
  border-bottom-right-radius: 4px;
}

.cursor-chat-bubble.specialist::before {
  content: 'Especialista · ';
  font-weight: 600;
  opacity: 0.85;
  font-size: 12px;
}

.cursor-chat-agents-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* acima do #app-boot-overlay (99999) e banners */
  background: rgba(2, 6, 23, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cursor-chat-agents-modal[hidden] {
  display: none !important;
}

.cursor-chat-agents-modal.is-open {
  display: flex !important;
}

.cursor-chat-agents-dialog {
  width: min(720px, 96vw);
  max-height: min(82vh, 820px);
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 16px;
  color: #e2e8f0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cursor-chat-agents-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #334155;
}

.cursor-chat-agents-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cursor-chat-agents-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.cursor-chat-agents-search {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font: inherit;
}

.cursor-chat-agents-body {
  overflow: auto;
  padding: 12px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cursor-chat-agents-group h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.cursor-chat-agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.cursor-chat-agent-pick {
  text-align: left;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.cursor-chat-agent-pick:hover {
  border-color: #818cf8;
  background: rgba(79, 70, 229, 0.2);
}

.cursor-chat-agent-pick strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.cursor-chat-agent-pick span {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

/* ——— Mobile / tablet: conversa em foco, lista em gaveta ——— */
@media (max-width: 900px) {
  .cursor-chat-page {
    height: calc(100dvh - 72px);
    min-height: 0;
    border-radius: 12px;
  }

  .cursor-chat-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .cursor-chat-title-bot {
    width: 32px;
    height: 32px;
  }

  .cursor-chat-header h3 {
    font-size: 1rem;
  }

  .cursor-chat-header-sub {
    display: none;
  }

  .cursor-chat-header-actions {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .cursor-chat-header-actions .cursor-chat-btn,
  .cursor-chat-header-actions .cursor-chat-badge {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .cursor-chat-hist-toggle {
    display: inline-flex;
  }

  /* Texto curto nos botões do topo */
  #cursorChatRefresh {
    font-size: 0;
    padding: 8px 10px;
  }
  #cursorChatRefresh::after {
    content: '↻';
    font-size: 14px;
  }
  #cursorChatNew {
    font-size: 0;
    padding: 8px 10px;
  }
  #cursorChatNew::after {
    content: '+';
    font-size: 16px;
    font-weight: 800;
  }
  #cursorChatDelete {
    font-size: 0;
    padding: 8px 10px;
  }
  #cursorChatDelete::after {
    content: '🗑';
    font-size: 13px;
  }
  #cursorChatStop {
    padding: 8px 10px;
  }
  #cursorChatTestPr,
  #cursorChatApprove,
  #cursorChatReject {
    padding: 8px 10px;
    font-size: 11px;
  }
  #cursorChatApprove {
    font-size: 0;
  }
  #cursorChatApprove::after {
    content: 'Publicar';
    font-size: 11px;
  }
  #cursorChatReject {
    font-size: 0;
  }
  #cursorChatReject::after {
    content: 'Descartar';
    font-size: 11px;
  }

  .cursor-chat-body {
    grid-template-columns: 1fr;
  }

  /* Lista escondida por padrão — a regra base `.display:flex` vinha DEPOIS e quebrava o mobile */
  .cursor-chat-sidebar {
    display: none;
  }

  .cursor-chat-sidebar.is-open-mobile {
    display: flex;
    position: absolute;
    inset: 8px 8px auto 8px;
    z-index: 20;
    max-height: min(70dvh, 520px);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    padding-bottom: 8px;
  }

  .cursor-chat-hist-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .cursor-chat-hist-tabs {
    align-items: center;
  }

  .cursor-chat-statusline {
    padding: 6px 12px;
    font-size: 11px;
    max-height: 4.5em;
    overflow: auto;
  }

  .cursor-chat-messages {
    padding: 12px;
    gap: 8px;
  }

  .cursor-chat-bubble {
    max-width: 94%;
    padding: 9px 28px 9px 12px;
    font-size: 14px;
  }

  .cursor-chat-map-fold {
    max-width: 94%;
  }

  .cursor-chat-composer {
    padding: 8px 10px 10px;
  }

  .cursor-chat-input-shell textarea {
    font-size: 16px; /* evita zoom no iOS */
  }

  .cursor-chat-providers {
    gap: 5px;
  }

  .cursor-chat-prov-label {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cursor-chat-used-ias .cursor-chat-prov-label {
    max-width: none;
  }

  /* Overlay escuro atrás da gaveta de conversas */
  .cursor-chat-page.is-hist-open::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    z-index: 15;
  }

  #cursorChatGameBtn {
    font-size: 0;
    padding: 8px 10px;
  }
  #cursorChatGameBtn::after {
    content: '♟';
    font-size: 15px;
  }
}

/* Modal-navegador do jogo (Catan) */
.cursor-chat-game-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 8, 23, 0.55);
}

.cursor-chat-game-modal.is-open {
  display: flex;
}

.cursor-chat-game-modal[hidden] {
  display: none !important;
}

.cursor-chat-game-card {
  width: min(1100px, 96vw);
  height: min(780px, 88vh);
  display: flex;
  flex-direction: column;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.cursor-chat-game-modal.is-max .cursor-chat-game-card {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
}

.cursor-chat-game-modal.is-max {
  padding: 0;
  background: #020817;
}

.cursor-chat-game-modal.is-docked {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.cursor-chat-game-modal.is-docked .cursor-chat-game-card {
  pointer-events: auto;
  width: min(320px, 92vw);
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.cursor-chat-game-modal.is-docked .cursor-chat-game-frame {
  display: none;
}

.cursor-chat-game-modal.is-float {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.cursor-chat-game-modal.is-float .cursor-chat-game-card {
  pointer-events: auto;
}

.cursor-chat-game-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.cursor-chat-game-card.is-dragging .cursor-chat-game-bar {
  cursor: grabbing;
}

.cursor-chat-game-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex-shrink: 0;
}

.cursor-chat-game-bar strong {
  color: #e2e8f0;
  font-size: 13px;
}

.cursor-chat-game-url {
  flex: 1;
  min-width: 0;
  color: #94a3b8;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cursor-chat-game-controls {
  display: flex;
  gap: 4px;
}

.cursor-chat-game-winbtn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #334155;
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.cursor-chat-game-winbtn:hover {
  background: #475569;
}

.cursor-chat-game-winbtn.is-close:hover {
  background: #7f1d1d;
  color: #fecaca;
}

.cursor-chat-game-done-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fecaca;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  border-bottom: 1px solid #fca5a5;
}

.cursor-chat-game-done-alert[hidden] {
  display: none !important;
}

.cursor-chat-game-done-alert-icon {
  font-size: 15px;
  line-height: 1;
}

.cursor-chat-game-modal.is-docked .cursor-chat-game-done-alert {
  display: none !important;
}

.cursor-chat-game-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: #020617;
}

.cursor-chat-canvas {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 18px 18px, rgba(148, 163, 184, 0.22) 1.2px, transparent 1.4px) 0 0 / 28px 28px,
    #07111f;
  color: #e8eef8;
}

.cursor-chat-canvas[hidden] {
  display: none !important;
}

.cursor-chat-canvas-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.92);
  flex-shrink: 0;
}

.cursor-chat-canvas-bar strong {
  font-size: 14px;
}

.cursor-chat-canvas-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #94a3b8;
  max-width: 52rem;
}

.cursor-chat-canvas-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.cursor-chat-canvas-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.cursor-chat-canvas-nodes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 36px 32px;
  padding: 28px 22px 40px;
}

.cursor-chat-canvas-ia-row,
.cursor-chat-canvas-tail {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 22px;
}

.cursor-chat-canvas-card {
  position: relative;
  min-width: 0;
  padding: 12px 14px 14px;
  border-radius: 14px;
  background: #0f1b2e;
  border: 1px solid rgba(125, 211, 252, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.cursor-chat-canvas-card.is-idle {
  opacity: 0.55;
}

.cursor-chat-canvas-card.is-running {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35), 0 10px 28px rgba(0, 0, 0, 0.28);
}

.cursor-chat-canvas-card.is-ok {
  border-color: rgba(74, 222, 128, 0.55);
}

.cursor-chat-canvas-card.is-nok {
  border-color: rgba(248, 113, 113, 0.7);
}

.cursor-chat-canvas-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 4px;
}

.cursor-chat-canvas-title {
  font-size: 13px;
  font-weight: 700;
}

.cursor-chat-canvas-body {
  margin-top: 6px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.35;
  max-height: 4.6em;
  overflow: hidden;
}

.cursor-chat-canvas-port {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #07111f;
  z-index: 2;
}

.cursor-chat-canvas-port.is-in {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
}

.cursor-chat-canvas-port.is-out {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 760px) {
  .cursor-chat-canvas-nodes {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}
