/* === V305.2: três atalhos com medida rigorosamente idêntica === */
.cvdb-top-shortcuts-v305 {
  --cvdb-shortcut-width: 132px;
  --cvdb-shortcut-height: 34px;
  --cvdb-shortcut-gap: 8px;

  display: inline-grid !important;
  grid-template-columns: repeat(3, var(--cvdb-shortcut-width)) !important;
  grid-auto-columns: var(--cvdb-shortcut-width) !important;
  align-items: center !important;
  justify-content: end !important;
  column-gap: var(--cvdb-shortcut-gap) !important;

  flex: 0 0 auto !important;
  width: calc((var(--cvdb-shortcut-width) * 3) + (var(--cvdb-shortcut-gap) * 2)) !important;
  min-width: calc((var(--cvdb-shortcut-width) * 3) + (var(--cvdb-shortcut-gap) * 2)) !important;
  max-width: calc((var(--cvdb-shortcut-width) * 3) + (var(--cvdb-shortcut-gap) * 2)) !important;
  height: var(--cvdb-shortcut-height) !important;
  min-height: var(--cvdb-shortcut-height) !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  white-space: nowrap;
}

.cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305,
.cvdb-top-shortcuts-v305 > a.cvdb-top-shortcut-v305,
.cvdb-top-shortcuts-v305 > button.cvdb-top-shortcut-v305 {
  appearance: none !important;
  box-sizing: border-box !important;
  position: relative !important;

  display: inline-flex !important;
  grid-column: auto !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;

  flex: none !important;
  inline-size: var(--cvdb-shortcut-width) !important;
  width: var(--cvdb-shortcut-width) !important;
  min-inline-size: var(--cvdb-shortcut-width) !important;
  min-width: var(--cvdb-shortcut-width) !important;
  max-inline-size: var(--cvdb-shortcut-width) !important;
  max-width: var(--cvdb-shortcut-width) !important;

  block-size: var(--cvdb-shortcut-height) !important;
  height: var(--cvdb-shortcut-height) !important;
  min-height: var(--cvdb-shortcut-height) !important;
  max-height: var(--cvdb-shortcut-height) !important;

  margin: 0 !important;
  padding: 0 12px !important;

  border: 1px solid rgba(105, 158, 255, 0.42) !important;
  border-radius: 10px !important;
  background: rgba(7, 27, 65, 0.48) !important;
  color: #f2f6ff !important;
  box-shadow: none !important;

  font: inherit !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;

  cursor: pointer !important;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease !important;
}

/* A área do ícone possui a mesma medida em todos os atalhos. */
.cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305::before {
  display: inline-grid !important;
  flex: 0 0 16px !important;
  place-items: center !important;
  inline-size: 16px !important;
  width: 16px !important;
  block-size: 16px !important;
  height: 16px !important;
  color: #8eb8ff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305:hover,
.cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305:focus-visible {
  border-color: rgba(118, 173, 255, 0.88) !important;
  background: rgba(20, 55, 112, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(70, 130, 235, 0.10) !important;
  color: #ffffff !important;
  outline: none !important;
  transform: none !important;
}

.cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305:active {
  box-shadow: none !important;
  transform: none !important;
}

.cvdb-top-shortcut-v305[data-kind="audit"]::before {
  content: "▣";
}

.cvdb-top-shortcut-v305[data-kind="financas"]::before {
  content: "R$";
  font-size: 9px !important;
}

/*
 * O terceiro botão permanece com a mesma largura dos demais.
 * Apenas reserva internamente o espaço do lápis, sem aumentar a caixa externa.
 */
.cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305[data-kind="custom"] {
  inline-size: var(--cvdb-shortcut-width) !important;
  width: var(--cvdb-shortcut-width) !important;
  min-width: var(--cvdb-shortcut-width) !important;
  max-width: var(--cvdb-shortcut-width) !important;
  padding: 0 30px 0 12px !important;
}

.cvdb-top-shortcut-v305[data-kind="custom"]::before {
  content: "↗";
  font-size: 11px !important;
}

.cvdb-shortcut-edit-v305 {
  box-sizing: border-box !important;
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;

  display: inline-grid !important;
  place-items: center !important;
  flex: none !important;

  inline-size: 18px !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  block-size: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;

  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid rgba(137, 176, 244, 0.24) !important;
  background: transparent !important;
  color: #a9c6f8 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  transform: translateY(-50%) !important;
}

.cvdb-top-shortcut-v305[data-configured="false"] .cvdb-shortcut-edit-v305 {
  color: #dbe8ff !important;
}

/* Mantém as três medidas iguais também em resoluções intermediárias. */
@media (max-width: 1360px) {
  .cvdb-top-shortcuts-v305 {
    --cvdb-shortcut-width: 122px;
    --cvdb-shortcut-gap: 6px;
  }

  .cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305 {
    padding-inline: 9px !important;
    font-size: 10px !important;
  }

  .cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305[data-kind="custom"] {
    padding: 0 27px 0 9px !important;
  }
}

@media (max-width: 1080px) {
  .cvdb-top-shortcuts-v305 {
    order: 2 !important;
    margin-top: 6px !important;
  }
}

/* Em telas pequenas, os três dividem igualmente a largura disponível. */
@media (max-width: 620px) {
  .cvdb-top-shortcuts-v305 {
    --cvdb-shortcut-gap: 6px;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305,
  .cvdb-top-shortcuts-v305 > a.cvdb-top-shortcut-v305,
  .cvdb-top-shortcuts-v305 > button.cvdb-top-shortcut-v305 {
    inline-size: 100% !important;
    width: 100% !important;
    min-inline-size: 0 !important;
    min-width: 0 !important;
    max-inline-size: 100% !important;
    max-width: 100% !important;
    padding-inline: 6px !important;
  }

  .cvdb-top-shortcuts-v305 > .cvdb-top-shortcut-v305[data-kind="custom"] {
    padding: 0 25px 0 6px !important;
  }
}


.cvdb-shortcuts-modal-backdrop-v305 {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 7, 23, 0.72);
  backdrop-filter: blur(5px);
}

.cvdb-shortcuts-modal-v305 {
  width: min(520px, 100%);
  border: 1px solid rgba(69, 130, 244, 0.62);
  border-radius: 18px;
  background: linear-gradient(180deg, #0d1d3f 0%, #07142e 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  color: #edf4ff;
  overflow: hidden;
}

.cvdb-shortcuts-modal-header-v305 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(97, 143, 224, 0.2);
}

.cvdb-shortcuts-modal-header-v305 h2 {
  margin: 0;
  font-size: 17px;
}

.cvdb-shortcuts-modal-close-v305 {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(106, 151, 232, 0.35);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe9ff;
  cursor: pointer;
}

.cvdb-shortcuts-modal-body-v305 {
  display: grid;
  gap: 9px;
  padding: 18px 20px 20px;
}

.cvdb-shortcuts-modal-body-v305 label {
  color: #b9c9e6;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cvdb-shortcuts-modal-body-v305 input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(70, 133, 245, 0.72);
  border-radius: 11px;
  background: #071126;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.cvdb-shortcuts-modal-body-v305 input:focus {
  border-color: #64a0ff;
  box-shadow: 0 0 0 3px rgba(55, 123, 242, 0.17);
}

.cvdb-shortcuts-modal-help-v305,
.cvdb-shortcuts-modal-error-v305 {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.cvdb-shortcuts-modal-help-v305 { color: #8fa5ca; }
.cvdb-shortcuts-modal-error-v305 { color: #ff9ea5; min-height: 18px; }

.cvdb-shortcuts-modal-actions-v305 {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.cvdb-shortcuts-modal-actions-v305 button {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(94, 143, 230, 0.38);
  background: rgba(255, 255, 255, 0.04);
  color: #eff5ff;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.cvdb-shortcuts-modal-actions-v305 .primary {
  border-color: #4d8dff;
  background: linear-gradient(180deg, #3f83f3, #2864d2);
}

.cvdb-shortcuts-modal-actions-v305 .danger {
  margin-right: auto;
  border-color: rgba(232, 93, 109, 0.45);
  color: #ffb5bd;
}
