#kmCustomModal,
#kmFixCustomModal,
.km-custom-modal,
.km-fix-modal {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.km-final-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(14px);
}

.km-final-modal.show {
  display: flex;
}

.km-final-box {
  position: relative;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid rgba(24, 198, 212, 0.22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(24, 198, 212, 0.17), transparent 34%),
    linear-gradient(180deg, rgba(12, 24, 48, 0.98), rgba(7, 18, 37, 0.98));
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.42);
  color: white;
}

.km-final-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #dbeafe;
  font-size: 22px;
  line-height: 1;
}

.km-final-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.km-final-head span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #18d6e3, #3b82f6);
  box-shadow: 0 14px 44px rgba(24, 198, 212, 0.22);
}

.km-final-head strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.km-final-head small {
  display: block;
  margin-top: 4px;
  color: #97a9c7;
  font-size: 13px;
}

.km-final-label {
  display: block;
  margin-bottom: 8px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.km-final-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 48px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 17px;
  background: rgba(2, 8, 23, 0.62);
}

.km-final-input input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: white;
  font-size: 16px;
  font-weight: 800;
}

.km-final-input em {
  padding: 0 12px;
  color: #78f4ff;
  font-size: 14px;
  font-weight: 900;
  font-style: normal;
  white-space: nowrap;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
}

.km-final-input button {
  width: 48px;
  height: 54px;
  padding: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #18d6e3, #3b82f6);
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.km-final-input button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.km-final-help {
  margin: 10px 0 0;
  color: #97a9c7;
  font-size: 12px;
  line-height: 1.5;
}

.km-final-inline {
  min-height: 22px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 800;
}

.km-final-inline.success {
  color: #86efac;
}

.km-final-inline.error {
  color: #fca5a5;
}

.km-final-inline.info {
  color: #93c5fd;
}

.km-final-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100001;
  max-width: min(420px, calc(100% - 36px));
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(7, 18, 37, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: 0.22s ease;
}

.km-final-notice.show {
  opacity: 1;
  transform: translateY(0);
}

.km-final-notice.success {
  border-color: rgba(34, 197, 94, 0.38);
}

.km-final-notice.error {
  border-color: rgba(248, 113, 113, 0.42);
}

.km-final-notice.info {
  border-color: rgba(96, 165, 250, 0.38);
}

@media (max-width: 520px) {
  .km-final-box {
    padding: 18px;
    border-radius: 22px;
  }

  .km-final-input {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .km-final-input em {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 10px 15px;
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
  }

  .km-final-input button {
    grid-column: 2;
    grid-row: 1;
  }
}
