/* ==========================================================================
   Configurações — paleta no estilo do "search" do Mobbin (1:1 em estrutura,
   medidas e comportamento), nas cores da Evenport: grafite azulado do painel
   escuro da radiografia, azul e verde do sistema.
   Abre "dentro da tela" do computador do agente: o que está atrás desfoca de
   leve; a moldura e o dock continuam nítidos.
   ========================================================================== */

.cmdk {
  position: fixed;
  inset: 0;
  z-index: 15;
}
.cmdk[hidden] {
  display: none;
}
.cmdk-scrim {
  position: absolute;
  inset: 0;
  background: rgba(236, 240, 246, 0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  transition: background-color 0.35s var(--ease), -webkit-backdrop-filter 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.cmdk.is-open .cmdk-scrim {
  background: rgba(236, 240, 246, 0.2);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
  backdrop-filter: blur(9px) saturate(1.05);
}

.cmdk-panel {
  --panel-w: min(816px, calc(100vw - 2 * var(--wall) - 64px));
  position: absolute;
  top: calc(var(--wall) + max(56px, 7.5vh));
  left: 50%;
  width: var(--panel-w);
  height: min(705px, calc(100vh - 2 * var(--wall) - max(56px, 7.5vh) - var(--du) * 9));
  margin-left: calc(var(--panel-w) / -2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(36, 39, 47, 0.9);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07) inset, 0 50px 110px -34px rgba(10, 16, 30, 0.6), 0 12px 30px -16px rgba(10, 16, 30, 0.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  backdrop-filter: blur(30px) saturate(1.3);
  font-family: var(--font);
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  transform-origin: 50% 0;
  transition: opacity 0.18s var(--ease), transform 0.22s var(--ease);
}
.cmdk.is-open .cmdk-panel {
  opacity: 1;
  transform: none;
  transition: opacity 0.26s var(--ease), transform 0.42s var(--spring-soft);
}

/* ---- topo: busca + escopo ---- */

.cmdk-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 18px 0 24px;
}
.cmdk-q {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: #fff;
  caret-color: var(--blue);
  outline: none;
  text-overflow: ellipsis;
}
.cmdk-q::placeholder {
  color: rgba(255, 255, 255, 0.46);
}
.cmdk-q::-webkit-search-cancel-button {
  display: none;
}
.cmdk-scope {
  flex: none;
  display: flex;
  gap: 4px;
}
.cmdk-scope-b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.cmdk-scope-b[aria-pressed="true"] {
  color: #fff;
}
.cmdk-scope-b:hover {
  background: rgba(255, 255, 255, 0.07);
}
.cmdk-scope-b .i {
  width: 18px;
  height: 18px;
}

/* ---- corpo: navegação + conteúdo ---- */

.cmdk-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 276px 1fr;
}
.cmdk-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 16px 16px 20px;
}
.cmdk-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 240px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  text-align: left;
  transition: background-color 0.18s var(--ease);
}
.cmdk-nav-item .i {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.8);
}
.cmdk-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.cmdk-nav-item.is-active {
  background: rgba(255, 255, 255, 0.085);
}
.cmdk-kbd {
  margin: auto 0 0;
  padding: 0 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
}
.cmdk-kbd kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-right: 3px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}
.cmdk-kbd kbd:nth-of-type(2) {
  margin-right: 6px;
}
.cmdk-kbd kbd:last-of-type {
  margin-left: 10px;
}
.cmdk-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 20px 26px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
.cmdk-content::-webkit-scrollbar {
  width: 6px;
}
.cmdk-content::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
}
.cm-view {
  animation: cm-in 0.22s var(--ease);
}
@keyframes cm-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* ---- seções ---- */

.cm-h {
  margin: 26px 0 12px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.62);
}
.cm-h:first-child {
  margin-top: 6px;
}
.cm-apps {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}
.cm-app {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.35s var(--spring), box-shadow 0.25s var(--ease);
}
.cm-app img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.cm-app:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.6);
}
.cm-app:active {
  transform: scale(0.96);
}
.cm-app-dot {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px #fff;
}
.cm-grid {
  display: grid;
  grid-template-columns: repeat(4, 124px);
  gap: 8px;
}
.cm-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  height: 124px;
  padding: 11px 12px;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-align: left;
  transition: background-color 0.2s var(--ease), transform 0.35s var(--spring);
}
.cm-tile.is-wide {
  grid-column: span 2;
}
.cm-tile b {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 15.5px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cm-tile:hover {
  background: rgba(255, 255, 255, 0.11);
}
.cm-tile:active {
  transform: scale(0.98);
}
.cm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cm-chip {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  transition: background-color 0.2s var(--ease), transform 0.35s var(--spring);
}
.cm-chip:hover {
  background: rgba(255, 255, 255, 0.16);
}
.cm-chip:active {
  transform: scale(0.97);
}

/* ---- miniaturas dentro dos cartões ---- */

.minis {
  position: absolute;
  right: 12px;
  bottom: 0;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 3px;
  pointer-events: none;
}
.ms {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 38px;
  height: 66px;
  padding: 6px 5px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.55);
  transform: translateY(8px);
  transition: transform 0.4s var(--spring);
}
.ms-1 {
  transform: translateY(18px);
}
.ms-2 {
  transform: translateY(24px);
}
.cm-tile:hover .ms {
  transform: translateY(4px);
}
.cm-tile:hover .ms-1 {
  transform: translateY(12px);
}
.ms.is-dark {
  background: #1f2328;
}
.ml {
  display: block;
  flex: none;
  width: var(--w);
  height: 3px;
  border-radius: 2px;
  background: #e1e5eb;
}
.ml.is-dark {
  background: #3a3f48;
}
.mav {
  display: block;
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cfd6e0 center / cover no-repeat;
}
.mbtn {
  display: block;
  height: 6px;
  margin-top: auto;
  border-radius: 3px;
  background: var(--blue);
}
.mtg {
  display: block;
  flex: none;
  width: 14px;
  height: 8px;
  margin-left: auto;
  border-radius: 4px;
  background: #d5dae2;
}
.mtg.is-on {
  background: var(--green);
}
.mbox {
  display: block;
  flex: none;
  height: 14px;
  border-radius: 3px;
  background: #e9eef6;
}
.mbox.is-dark {
  background: #333842;
}
.mfield {
  display: block;
  flex: none;
  height: 7px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #d5dae2;
}
.mrow {
  display: flex;
  flex: none;
  align-items: center;
  gap: 3px;
  height: 7px;
}
.mrow::after {
  content: "";
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #e1e5eb;
}
.mrow b {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9ced6;
}
.mrow b.ok {
  background: var(--green);
}
.mbars {
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: 2px;
}
.mbars s {
  flex: 1;
  height: var(--h);
  border-radius: 1px;
  background: #5a9bf5;
}
.mnote {
  display: block;
  flex: none;
  height: 10px;
  border-radius: 3px;
  background: #f1f3f6;
  box-shadow: inset 2px 0 0 var(--blue);
}
.mlock {
  display: block;
  flex: none;
  width: 12px;
  height: 12px;
  margin: 2px auto 0;
  border-radius: 3px;
  background: #1f2328;
}
.mcode {
  display: flex;
  flex: none;
  gap: 2px;
}
.mcode s {
  flex: 1;
  height: 8px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #c9ced6;
}
.mstep {
  display: flex;
  flex: none;
  align-items: center;
  gap: 3px;
  height: 7px;
}
.mstep::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9ced6;
}
.mstep::after {
  content: "";
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #e1e5eb;
}
.mstep.ok::before {
  background: var(--green);
}
.mstep.ai::before {
  background: var(--blue);
}

/* ---- listas (agentes, integrações, segurança, resultados) ---- */

.cm-list {
  display: grid;
  gap: 2px;
}
.cm-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: #fff;
  text-align: left;
  transition: background-color 0.18s var(--ease);
}
.cm-list-row:hover,
.cm-list-row.is-sel {
  background: rgba(255, 255, 255, 0.08);
}
.cm-list-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}
.cm-list-ic img {
  width: 20px;
  height: 20px;
  padding: 0;
}
.cm-list-ic:has(img) {
  background: #fff;
}
.cm-list-t {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.cm-list-t b {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cm-list-t small {
  overflow: hidden;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-badge {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}
.cm-badge.is-on {
  background: rgba(62, 207, 142, 0.16);
  color: #7fe0b1;
}
.cm-list-go {
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.35);
}
.cm-list-row:not(:has(.cm-badge)) .cm-list-go {
  margin-left: auto;
}
.cm-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 70px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}
.cm-empty .i {
  width: 22px;
  height: 22px;
  margin-bottom: 6px;
}
.cm-empty b {
  font-size: 16px;
  color: #fff;
}
.cm-empty span {
  font-size: 13.5px;
}

/* ---- detalhe de um item ---- */

.cf-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 16px;
  padding: 5px 10px 5px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.cf-back:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.cf-back .i {
  width: 14px;
  height: 14px;
}
.cf-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.cf-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.09);
}
.cf-ic .i {
  width: 22px;
  height: 22px;
}
.cf-ic--app {
  background: #fff;
}
.cf-head h3 {
  margin: 2px 0 4px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cf-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}
.cf-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}
.cf-hero > span:not(.cf-av) {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cf-hero b {
  font-size: 16px;
  font-weight: 600;
}
.cf-hero small {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.cf-hero .cf-btn {
  margin-left: auto;
}
.cf-av {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #5a9bf5, #1c5ab6);
  font-size: calc(var(--s) * 0.36);
  font-weight: 600;
}
.cf-av img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cf-group {
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}
.cf-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
}
.cf-row + .cf-row {
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06);
}
.cf-label {
  display: grid;
  gap: 2px;
  margin-right: auto;
  font-size: 14.5px;
  font-weight: 500;
}
.cf-label small {
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.52);
}
.cf-value {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}
.cf-link {
  padding: 4px 2px;
  border: 0;
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  color: #6aaeff;
}
.cf-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cf-input {
  width: 58%;
  height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: box-shadow 0.2s var(--ease);
}
.cf-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.cf-input:focus {
  box-shadow: 0 0 0 1.5px var(--blue), 0 0 0 4px rgba(22, 127, 246, 0.2);
}
.cf-input[readonly] {
  color: rgba(255, 255, 255, 0.55);
}
.sw {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.2);
  transition: background-color 0.25s var(--ease);
}
.sw i {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s var(--spring);
}
.sw[aria-checked="true"] {
  background: var(--green);
}
.sw[aria-checked="true"] i {
  transform: translateX(18px);
}
.cf-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
}
.cf-seg-o {
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.cf-seg-o[aria-checked="true"] {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.cf-actions {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
}
.cf-btn {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), transform 0.35s var(--spring);
}
.cf-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.cf-btn:active {
  transform: scale(0.97);
}
.cf-btn--primary {
  background: #fff;
  color: #11151c;
}
.cf-btn--primary:hover {
  background: #e9ecf1;
}
.cf-btn--danger {
  background: rgba(255, 107, 107, 0.12);
  color: #ff8a8a;
}
.cf-btn--danger:hover {
  background: rgba(255, 107, 107, 0.2);
}
.cf-btn.is-done {
  background: rgba(62, 207, 142, 0.18);
  color: #7fe0b1;
}
.cf-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
}

/* item "Configurações" no menu da conta */
.user-pop-item kbd {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(20, 30, 60, 0.06);
  font: inherit;
  font-size: 11px;
  color: #7a7f8a;
}

/* ==========================================================================
   Mobile e tablet em retrato
   ========================================================================== */

@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .cmdk-panel {
    --panel-w: auto;
    top: calc(var(--wall) + 58px);
    left: calc(var(--wall) + 6px);
    right: calc(var(--wall) + 6px);
    bottom: calc(var(--wall) + var(--dock-item) + 30px);
    width: auto;
    height: auto;
    margin-left: 0;
    border-radius: 22px;
  }
  .cmdk-head {
    height: 54px;
    padding: 0 10px 0 18px;
  }
  .cmdk-scope-b {
    width: 30px;
    height: 30px;
  }
  .cmdk-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .cmdk-nav {
    flex-direction: row;
    gap: 6px;
    padding: 2px 14px 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cmdk-nav::-webkit-scrollbar {
    display: none;
  }
  .cmdk-nav-item {
    flex: none;
    width: auto;
    height: 34px;
    padding: 0 12px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 14px;
  }
  .cmdk-nav-item .i {
    width: 16px;
    height: 16px;
  }
  .cmdk-kbd {
    display: none;
  }
  .cmdk-content {
    padding: 0 14px 20px;
  }
  .cm-apps {
    overflow-x: auto;
    margin: 0 -14px;
    padding: 4px 14px 2px;
    scrollbar-width: none;
  }
  .cm-apps::-webkit-scrollbar {
    display: none;
  }
  .cm-app {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
  .cm-app img {
    width: 30px;
    height: 30px;
  }
  .cm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cm-tile {
    height: 108px;
  }
  .cm-tile b {
    font-size: 14.5px;
  }
  .cm-chip {
    height: 36px;
    padding: 0 14px;
    font-size: 14px;
  }
  .cf-row--field {
    flex-wrap: wrap;
  }
  .cf-input {
    width: 100%;
  }
  .cf-row--seg {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cmdk-panel,
  .cmdk-scrim,
  .cm-view {
    transition: none !important;
    animation: none !important;
  }
}
